-
Notifications
You must be signed in to change notification settings - Fork 4
fix: be more explicit about *_VERSION (tag, branch) and *_SHA #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request addresses a critical bug in the mirror path construction by distinguishing between version identifiers (branch/tag names) and commit SHA values. When SPACK_VERSION or similar variables were passed as commit SHAs, the buildcache mirror URLs would be incorrect (e.g., oci://ghcr.io/eic/spack-<sha> instead of oci://ghcr.io/eic/spack-<version>).
Key Changes:
- Introduced separate
*_SHAbuild arguments alongside existing*_VERSIONarguments across all Dockerfiles and CI configurations - Modified git checkout commands to use
${*_SHA:-${*_VERSION}}fallback pattern, preferring SHA when available - Updated CI pipelines to resolve git references and pass both VERSION and SHA as separate build arguments
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| containers/debian/Dockerfile | Added *_SHA ARG declarations for SPACK, SPACKPACKAGES, KEY4HEPSPACK, and EICSPACK; updated git checkout commands to use SHA with VERSION fallback |
| containers/eic/Dockerfile | Renamed *_VERSION to *_SHA for EDM4EIC, EICRECON, EPIC, JUGGLER, BENCHMARK, and CAMPAIGNS; updated git checkout commands with default fallbacks |
| .gitlab-ci.yml | Added *_SHA build arguments alongside *_VERSION; updated to resolve git refs separately for both values |
| .github/workflows/build-push.yml | Added SHA output variables alongside VERSION; updated build-args to pass both SHA and VERSION values |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
veprbl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
* fix: be more explicit about *_VERSION (tag, branch) and *_SHA * fix: default *_SHA to empty Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: check if *_VERSION is defined before setting *_SHA Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Briefly, what does this PR introduce?
We are writing a default read-only mirror with
but when we pass
SPACK_VERSIONas a sha that's not the right location.This PR ensures that the *_VERSION and *_SHA build arguments are both accepted, and makes it clearer which is which.
What kind of change does this PR introduce?