Skip to content

[fullsend] E2E: argocd — setup script race condition on GitOps route #3067

Description

@fullsend-ai-triage

fullsend-tracking: workspace=argocd
fullsend-tracking: root-cause=argocd-route-wait
fullsend-tracking: branch=main

Classification

fix_category: test_fix

Failed Tests

Test Error
Verify deployment summary card and drawer close button Error from server (NotFound): routes.route.openshift.io "openshift-gitops-server" not found

Root Cause

Race condition in deploy-openshift-gitops.sh setup script. After installing the OpenShift GitOps operator, the script waits for the ArgoCD server Deployment to have available replicas (install_gitops_operator() line 52-54) but does not wait for the Route openshift-gitops-server to be created by the operator's reconciliation loop.

The get_argocd_credentials() function (line 83) immediately attempts:

ARGOCD_URL="https://$(oc get route openshift-gitops-server -n "${GITOPS_NAMESPACE}" -o jsonpath='{.spec.host}')"

With set -euo pipefail (line 2), the NotFound error terminates the entire script. This propagates to argocd.spec.ts line 24 (await $\bash ${setupScript} ${namespace}`) inside the test.runOnce("argocd-infra", ...)` block, failing all 7 tests.

Evidence:

  • Build log: Error from server (NotFound): routes.route.openshift.io "openshift-gitops-server" not found
  • Fresh operator installation (subscription created new, not "already installed")
  • The wait_for helper function already exists in the script (lines 10-27) and is used for CRDs and deployments
  • Operator was healthy later in the run (controller-manager running at 28m age)

Remediation

Target branch: main

In workspaces/argocd/e2e-tests/tests/specs/deploy-openshift-gitops.sh, add a route wait at the beginning of get_argocd_credentials() (before line 83):

get_argocd_credentials() {
  echo "=== Retrieving ArgoCD credentials ==="

  # Wait for the operator to create the Route (may lag behind Deployment readiness)
  wait_for "ArgoCD server route" \
    "oc get route openshift-gitops-server -n ${GITOPS_NAMESPACE}" 120 10

  ARGOCD_URL="https://$(oc get route openshift-gitops-server -n "${GITOPS_NAMESPACE}" -o jsonpath='{.spec.host}')"

The wait_for helper (line 10) already exists and is used for other resources. Use 120s timeout with 10s interval, matching the pattern used for CRDs.

Artifacts

https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-redhat-developer-rhdh-plugin-export-overlays-main-e2e-ocp-helm-nightly/2083402759867994112


Triggered by #3063

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions