Skip to content

Pin reproducibility checks to the deployed snapshot#505

Open
ppkarwasz wants to merge 2 commits into
gha/v0from
feat/gha/pinned-reference-repository
Open

Pin reproducibility checks to the deployed snapshot#505
ppkarwasz wants to merge 2 commits into
gha/v0from
feat/gha/pinned-reference-repository

Conversation

@ppkarwasz

Copy link
Copy Markdown
Member

Currently verify-reproducibility-reusable.yaml resolves 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.yaml now publishes the local staging directory of nexus-staging-maven-plugin (target/nexus-staging/deferred, the exact bits uploaded to Nexus) as a run artifact and exports its name as a repository-artifact-name output.
  • verify-reproducibility-reusable.yaml accepts a new reference-artifact-name input. When set, the artifact is downloaded and used as a file:// reference repository. Exactly one of nexus-url and reference-artifact-name must be provided.

The release path is unaffected: releases are verified against their dedicated staging repository via nexus-url, which is already immutable per release.

`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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml uploads target/nexus-staging/deferred as a run artifact and exposes its name as an output.
  • verify-reproducibility-reusable.yaml adds a reference-artifact-name input, 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.

Comment thread .github/workflows/verify-reproducibility-reusable.yaml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

2 participants