Skip to content

fix(e2e): retry k3d image import when the tools-node tarball race drops the image#185

Merged
sunib merged 1 commit into
mainfrom
fix/e2e-k3d-image-import-retry
Jul 2, 2026
Merged

fix(e2e): retry k3d image import when the tools-node tarball race drops the image#185
sunib merged 1 commit into
mainfrom
fix/e2e-k3d-image-import-retry

Conversation

@sunib

@sunib sunib commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Why

The first external-contributor PR through the new artifact-based CI path (#178, run 28610319679) failed in E2E (quickstart). The artifact delivery itself worked — the project image was docker-loaded on the runner and k3d's tools node saved it from the runtime — but k3d then hit a transient race in its tools-node import flow:

ERRO failed to import images in node 'k3d-...-server-0': ...
ctr: open /k3d/images/k3d-...-images-20260702175725.tar: no such file or directory
INFO Successfully imported 1 image(s) into 1 cluster(s)   <-- k3d still exits 0

The pin/verify step in hack/e2e/load-image.sh correctly caught that the image never landed in containerd and failed the prepare. Since the CI rework, every PR e2e job delivers the image via k3d image import (load mode) instead of a registry pull, so this pre-existing k3d flake now has much more exposure.

Same pipeline passed 3 imports on PR #180's own run and on the release-please 0.29.1 run, same runner image, 79 GB disk free at failure time — confirming it's an intermittent k3d race, not a problem with the artifact wiring.

What

import_image() now retries the import + pin/verify sequence up to 3 times; the pin step is the only reliable signal that the import actually succeeded, because k3d exits 0 even when a node's ctr image import fails.

Validation

  • task fmt / task generate / task manifests / task vet: clean
  • task lint: 0 issues
  • task test: pass (coverage 73.8%, baseline 73.9%, within tolerance)
  • task test-e2e: pass (53/53 specs, 8 skipped)

🤖 Generated with Claude Code

…ps the image

k3d's tools-node import can transiently lose the saved tarball between
the save and the per-node `ctr image import` ("ctr: open
/k3d/images/<tar>: no such file or directory") while still exiting 0
and logging "Successfully imported". The pin/verify step in
load-image.sh already detects the miss; now it re-runs the whole
import up to 3 times instead of failing the prepare on the first race.

Observed in CI on a fork PR run where load delivery is now used for
every PR e2e job:
https://github.com/ConfigButler/gitops-reverser/actions/runs/28610319679

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@sunib, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 71260995-51da-4c31-9e7a-f8c7f9064cfa

📥 Commits

Reviewing files that changed from the base of the PR and between a96ef2b and 54cc539.

📒 Files selected for processing (1)
  • hack/e2e/load-image.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-k3d-image-import-retry

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sunib
sunib merged commit e426206 into main Jul 2, 2026
12 checks passed
@sunib
sunib deleted the fix/e2e-k3d-image-import-retry branch July 2, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant