Description
When the integration tests gate retries a failed matrix run, the retried e2e jobs can run without their install job re-executing. The namespace created by the original install has already been cleaned up by then, so every retried e2e job fails with:
Error: namespace 'camunda-pr-<pr>-intg-<version>-gke-<flow>-<hash>' not found in the current Kubernetes context
This is worse than a plain retry failure: it replaces the original error with a misleading one. The real cause is no longer visible in the final check output, and anyone reading the PR sees a Kubernetes namespace problem that does not exist.
Observed on PR #6823, run 32011352361.
Expected vs Actual Behavior
Expected: a gate retry either re-establishes the preconditions the retried jobs need (i.e. re-runs install), or does not retry jobs whose preconditions are gone.
Actual: the e2e job re-runs alone against a deleted namespace and fails with an unrelated error, and the gate reports that second failure as the run's conclusion.
Steps to Reproduce
- Get a transient infrastructure failure in a
Playwright e2e smoke after install job — in the observed case, codeload.github.com returned HTTP 429 while downloading docker/setup-buildx-action@bb05f3f, failing 2× Local cluster - KIND and 2× Playwright e2e smoke ... eske (8.8 and 8.9).
- Let the gate detect the failure and trigger its one-shot retry (
gate.go:221, triggering retry of failed jobs).
- Observe the retried e2e job fail with
namespace ... not found.
Additional Context
Evidence from run 32011352361:
| Attempt |
Trigger |
install job |
e2e outcome |
| 1 |
original |
ran 08:39:57→08:44:18 |
failed — codeload 429 (real cause) |
| 2 |
gate retry |
not re-executed — record still shows started_at 08:39:57 |
failed — namespace ... not found |
| 3 |
manual gh run rerun <id> |
re-executed 09:29:45 |
passed |
Attempt 1's failure was purely transient:
##[error]Response status code does not indicate success: 429 (Too Many Requests).
##[error]Failed to download archive '.../docker/setup-buildx-action/tar.gz/bb05f3f...' after 3 attempts.
Cleanup is not the culprit in an obvious way — the Cleanup job for the affected flow ran at 08:59:57, after the attempt-2 e2e failure at 08:58:37. The namespace was already gone from attempt 1's own cleanup.
Namespace collision across runs is ruled out: ciworkflow/workflowvars.go:175 hashes namespace + RunID, so namespaces are per-run.
Unexplained discrepancy — worth confirming before choosing a fix. The gate invokes gh run rerun <runID> with no --failed flag (gh.go:103-105), which should re-run all jobs. That is the same command used manually for attempt 3, where install did re-execute. Yet in attempt 2 install retained its attempt-1 started_at. Same command, different observed behaviour. I have not been able to explain this from the run data alone, so the mechanism should be confirmed rather than assumed.
Possible directions (not a recommendation until the above is understood):
- Ensure the retry re-runs the
install job for any flow whose e2e jobs are being retried.
- Defer namespace cleanup until the gate has reached a final conclusion, so a retry still has its namespace.
- Fail fast with a clear message when a retried e2e job finds its namespace missing, so the misleading error never becomes the reported conclusion.
The comment at workflowvars.go:171-173 states the run attempt is deliberately excluded from the namespace hash so that "re-run failed jobs" computes the same namespace as the original install. That intent only holds while the namespace still exists; this issue is the case where it does not.
Acceptance Criteria
References
Environment
Description
When the integration tests gate retries a failed matrix run, the retried e2e jobs can run without their
installjob re-executing. The namespace created by the original install has already been cleaned up by then, so every retried e2e job fails with:This is worse than a plain retry failure: it replaces the original error with a misleading one. The real cause is no longer visible in the final check output, and anyone reading the PR sees a Kubernetes namespace problem that does not exist.
Observed on PR #6823, run
32011352361.Expected vs Actual Behavior
Expected: a gate retry either re-establishes the preconditions the retried jobs need (i.e. re-runs
install), or does not retry jobs whose preconditions are gone.Actual: the e2e job re-runs alone against a deleted namespace and fails with an unrelated error, and the gate reports that second failure as the run's conclusion.
Steps to Reproduce
Playwright e2e smoke after installjob — in the observed case,codeload.github.comreturned HTTP 429 while downloadingdocker/setup-buildx-action@bb05f3f, failing 2×Local cluster - KINDand 2×Playwright e2e smoke ... eske(8.8 and 8.9).gate.go:221,triggering retry of failed jobs).namespace ... not found.Additional Context
Evidence from run
32011352361:installjob08:39:57→08:44:18started_at 08:39:57namespace ... not foundgh run rerun <id>09:29:45Attempt 1's failure was purely transient:
Cleanup is not the culprit in an obvious way — the
Cleanupjob for the affected flow ran at08:59:57, after the attempt-2 e2e failure at08:58:37. The namespace was already gone from attempt 1's own cleanup.Namespace collision across runs is ruled out:
ciworkflow/workflowvars.go:175hashesnamespace + RunID, so namespaces are per-run.Unexplained discrepancy — worth confirming before choosing a fix. The gate invokes
gh run rerun <runID>with no--failedflag (gh.go:103-105), which should re-run all jobs. That is the same command used manually for attempt 3, whereinstalldid re-execute. Yet in attempt 2installretained its attempt-1started_at. Same command, different observed behaviour. I have not been able to explain this from the run data alone, so the mechanism should be confirmed rather than assumed.Possible directions (not a recommendation until the above is understood):
installjob for any flow whose e2e jobs are being retried.The comment at
workflowvars.go:171-173states the run attempt is deliberately excluded from the namespace hash so that "re-run failed jobs" computes the same namespace as the original install. That intent only holds while the namespace still exists; this issue is the case where it does not.Acceptance Criteria
namespace ... not found.scripts/integration-tests-gate/gate_test.go.References
32011352361(attempts 1–3)scripts/integration-tests-gate/gate.go:221,scripts/integration-tests-gate/gh.go:103scripts/camunda-core/pkg/ciworkflow/workflowvars.go:165-195Environment