Skip to content

Conversation

@shbhmexe
Copy link

This PR fixes a false-positive image existence check in ci/gha-runner-vm that could cause periodic image builds to be skipped even when the target image does not exist. It also hardens related runner tooling (ssh retry + scp upload) and improves error handling so failures are surfaced as actionable errors rather than panics/exits.

Changes

  • ci/gha-runner-vm
    • imageExists now returns false when no matching image exists, and errors are propagated to the caller.
    • Tarball download now errors on non-200 HTTP responses.
    • Tar extraction helpers no longer call os.Exit().
    • Patching preserves existing file permissions.
    • Fix an arm64 .deb filename typo (arm64.db -> arm64.deb).
  • ci/cloudrunners
    • Fix ssh retry attempt counting and respect context cancellation.
    • Make scp upload use Start/Wait to avoid a goroutine leak.
    • Avoid panic() when OCI image listing fails.

Why this is safe

No new features are added; changes are limited to correctness, stability, and error-handling improvements. Existing behavior is preserved except where the current behavior is clearly incorrect (e.g., treating "no images found" as "image exists").

Testing

  • go test ./... in ci/cloudrunners
  • go test ./... in ci/gha-runner-vm

Confirmation

  • The change set is focused and does not intentionally alter existing functionality beyond fixing the bugs described above.
  • It does not revert or duplicate the latest merged change (db5d055).

…pers

- Fix `ci/gha-runner-vm` returning `true` when no matching OCI image exists (preventing periodic jobs from incorrectly skipping image builds).
- Improve error reporting when downloading the runner-images tarball (non-200 HTTP responses now return an error).
- Avoid `os.Exit()` from tar extraction helpers; propagate errors instead.
- Preserve file permissions when patching extracted files.
- Fix ssh retry attempt counting + respect context cancellation.
- Avoid a goroutine leak in the scp upload helper.
- Replace a `panic()` with a returned error in OCI cloudrunner image listing.

Signed-off-by: shbhmexe <[email protected]>
@github-actions github-actions bot added needs-triage Indicates an issue or PR that has not been triaged yet (has a 'triage/foo' label applied) needs-kind Indicates an issue or PR that is missing an issue type or kind (a kind/foo label) help wanted labels Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted needs-kind Indicates an issue or PR that is missing an issue type or kind (a kind/foo label) needs-triage Indicates an issue or PR that has not been triaged yet (has a 'triage/foo' label applied)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant