Repository navigation
fix(#446): wrap E2E ImageRepository updates with RetryOnConflict - #448
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
The E2E test helpers UpdatePushSecretName, AddAnnotationsToIR, and RemoveFinalizerFromIR perform GET-then-UPDATE on ImageRepository objects without conflict retry. When the controller reconciles the same object concurrently, the test's write hits a stale resourceVersion and fails with a 409 Conflict error. This flake was observed across 4+ unrelated PRs. Wrap all 6 read-modify-write call sites in retry.RetryOnConflict(retry.DefaultRetry, ...) so transient conflict errors are retried automatically using the standard client-go backoff. Note: golangci-lint could not run (sandbox restriction). go build, go vet, and gofmt passed. E2E tests require a cluster and cannot be run by the code agent. Closes #446 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Scenario: konflux-e2e-image-controller
Inspecting Test ArtifactsTo inspect your test artifacts, follow these steps:
mkdir -p oras-artifacts
cd oras-artifacts
oras pull quay.io/konflux-test-storage/konflux-team/image-controller:konflux-e2e-image-controller-6z67xTest results analysis🚨 Error occurred while running the E2E tests, list of failed Spec(s): ➡️ [ Click to view logsfailed while checking component "test-comp-ktfh" version status to succeeded
Unexpected error:
:
context deadline exceeded
{}
occurred➡️ [ Click to view logsfailed while waiting for image repository "image-repository-ibsr" to be ready
Unexpected error:
:
context deadline exceeded
{}
occurred➡️ [ Click to view logsfailed while waiting for image repository "image-repository-tjao" to be ready
Unexpected error:
:
context deadline exceeded
{}
occurred➡️ [ Click to view logsfailed while waiting for image repository "image-repository-two-wfit" to be ready
Unexpected error:
:
context deadline exceeded
{}
occurred➡️ [ Click to view logsFailed to create private image repo in redhat-appstudio-qe org OCI Artifact Browser URL |
Description
Wrap all 6 read-modify-write E2E test helper calls on ImageRepository objects with
retry.RetryOnConflict(retry.DefaultRetry, ...)to eliminate flaky 409 Conflict errors.The helpers
UpdatePushSecretName,AddAnnotationsToIR, andRemoveFinalizerFromIR(fromCommonController) perform GET-then-UPDATE without conflict retry. When the image-controller reconcile loop modifies the sameImageRepositorybetween the test's read and write, the test fails withthe object has been modified. This was observed on 4+ unrelated PRs (#379, #419, #408, #353).Changed call sites in
e2e-tests/tests/image_controller_v2.go:UpdatePushSecretName(1 site)AddAnnotationsToIR(2 sites)RemoveFinalizerFromIR(3 sites)The
k8s.io/client-godependency (v0.34.2) was already present ine2e-tests/go.mod.Testing
go build ./tests/passed (e2e-tests project compiles successfully)go vet ./tests/passed (no issues found)gofmtreports no formatting issuesCloses #446
Post-script verification
agent/446-retry-on-conflict-e2e)2fb397e3564bbd49b34ee23d39d695c941c712ef..HEAD)