CI: Gradle dependency verification update workflow#2020
Open
nzb-tuxxx wants to merge 2 commits into
Open
Conversation
Add a scheduled and manually runnable workflow that updates Gradle dependency verification metadata across the release runner set using Gradle's incremental metadata update flow. Assisted-by: OpenAI Codex (GPT-5, reasoning: high)
A scheduled dependency verification run failed while downloading the Gradle distribution with: Error: Exception in thread "main" java.io.IOException: Server returned HTTP response code: 504 for URL. Cache the Gradle wrapper distribution so warm-cache runs can avoid repeating that download. The cache is intentionally limited to ~/.gradle/wrapper/dists. It does not cache Gradle dependency artifacts, Maven artifacts, or keyring state, so dependency verification resolution remains fresh for the supply-chain check. The cache defaults to enabled through CACHE_GRADLE_WRAPPER_DISTRIBUTION='true' and can be disabled for fork test runs by setting that environment variable to 'false'. Assisted-by: OpenAI Codex (GPT-5, reasoning: high)
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.
Draft implementation for #2006.
This adds a scheduled/manual GitHub Actions workflow to maintain Gradle dependency verification metadata for Sparrow. The goal is to make dependency artifact changes explicit and reviewable, including platform-specific artifacts resolved during packaging.
This is intended as a defense-in-depth improvement. It does not solve artifact provenance by itself, but it makes Maven artifact changes visible in the source tree and reviewable through the normal PR workflow.
Workflow
The workflow uses the same runner set as the release packaging workflow:
ubuntu-22.04ubuntu-22.04-armwindows-2022macos-15-intelmacos-14It runs the platforms serially so Gradle can update the same verification metadata incrementally without a custom XML merge step.
Steps:
gradle/verification-metadata.xmlif it does not exist yet.sha512pgp,sha512--export-keys.verification-metadata.xmlandverification-keyring.keysto the next platform job.Permissions
Most jobs run with read-only repository permissions:
Only the final PR update job requests write permissions:
The write permission is needed because that job pushes/updates the fixed automation branch and opens or updates the PR.
Please review whether this permission model is acceptable for Sparrow, or whether you would prefer a different approach, such as a read-only workflow that only uploads generated files as artifacts, or an external fork/bot workflow that opens PRs from outside the main repository.
Configuration
The workflow has conservative defaults:
ALLOW_ADDITIONAL_ARTIFACT_CHECKSUMSfalsealso-trustchecksum additions are handled.falsemeans the workflow aborts if Gradle adds an additional trusted checksum for an already-known artifact coordinate.trueonly if such additions should be allowed into the automated update PR.CLEAN_STALE_VERIFICATION_METADATAfalsefalsekeeps normal incremental Gradle behavior.trueintentionally regenerates verification metadata from a clean starting point across all release platforms, so stale metadata entries can be removed.CACHE_GRADLE_WRAPPER_DISTRIBUTIONtruetruecaches only~/.gradle/wrapper/dists, so repeated runs can avoid downloading the Gradle distribution again.Server returned HTTP response code: 504 for URL.falseif the wrapper distribution cache should be disabled for debugging or fork test runs.Why a separate composite action
The repeated Gradle/update/upload logic is kept in a local composite action:
Tested
This has been tested in a fork with:
gradle/verification-metadata.xml/gradle/verification-keyring.keysalso-trustI have enabled this workflow in my fork and would suggest collecting some experience there first, including waiting for real artifact updates to confirm they are reflected correctly in generated PRs, before considering this for merge; early feedback is of course very welcome.