Pin reproducibility checks to the deployed snapshot#505
Open
ppkarwasz wants to merge 2 commits into
Open
Conversation
`deploy-snapshot-reusable` now publishes the local staging directory of `nexus-staging-maven-plugin` (the exact bits uploaded to Nexus) as a run artifact. `verify-reproducibility-reusable` accepts a new `reference-artifact-name` input and, when set, uses that artifact as a `file://` reference repository instead of `nexus-url`. This prevents the comparison from picking up a newer snapshot deployed by a concurrent run. Assisted-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the reusable snapshot deploy + reproducibility verification workflows to eliminate a race where reproducibility checks could resolve against a concurrently-deployed Nexus snapshot. It does so by publishing the exact staged repository contents as a workflow artifact and (optionally) using that artifact as the reference repository via a file:// URL.
Changes:
deploy-snapshot-reusable.yamluploadstarget/nexus-staging/deferredas a run artifact and exposes its name as an output.verify-reproducibility-reusable.yamladds areference-artifact-nameinput, downloads the artifact when provided, and uses it as the reference repo.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/verify-reproducibility-reusable.yaml | Adds support for using a downloaded run artifact as the reproducibility reference repository instead of a Nexus snapshot URL. |
| .github/workflows/deploy-snapshot-reusable.yaml | Publishes the locally staged Maven repository directory as a workflow artifact and exports its artifact name to callers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently
verify-reproducibility-reusable.yamlresolves the reference artifacts from the Nexus snapshot repository, so a snapshot deployed by a concurrent run can be picked up instead of the one produced by the current run.This PR fixes the race condition, by uploading the snapshot repo as a workflow artifact:
deploy-snapshot-reusable.yamlnow publishes the local staging directory ofnexus-staging-maven-plugin(target/nexus-staging/deferred, the exact bits uploaded to Nexus) as a run artifact and exports its name as arepository-artifact-nameoutput.verify-reproducibility-reusable.yamlaccepts a newreference-artifact-nameinput. When set, the artifact is downloaded and used as afile://reference repository. Exactly one ofnexus-urlandreference-artifact-namemust be provided.The release path is unaffected: releases are verified against their dedicated staging repository via
nexus-url, which is already immutable per release.