Skip to content

ci(workflow-fix): add commitish build handling to determinism checks#25525

Open
andrewb1269 wants to merge 7 commits into
mainfrom
25492-determinism-updates
Open

ci(workflow-fix): add commitish build handling to determinism checks#25525
andrewb1269 wants to merge 7 commits into
mainfrom
25492-determinism-updates

Conversation

@andrewb1269
Copy link
Copy Markdown
Contributor

@andrewb1269 andrewb1269 commented May 18, 2026

Description:

This pull request updates the CI workflows for verifying Gradle and Docker build determinism. The main changes add logic to compute a commit-based prefix from the branch name and use it to update the Gradle project version before building artifacts. Additionally, baseline artifact paths are updated for better organization. These changes help ensure that builds are uniquely identified by branch and commit, improving traceability and reproducibility.

Commit Prefix and Versioning Enhancements:

  • Added a step to compute a lowercased, sanitized commit prefix based on the branch name in both zxc-verify-docker-build-determinism.yaml and zxc-verify-gradle-build-determinism.yaml workflows. This prefix is used to uniquely identify builds from different branches or commits. [1] [2] [3]
  • Introduced a new step to update the Gradle project version using the computed commit prefix before building artifacts, ensuring that artifact versions reflect the branch/commit context. [1] [2] [3]

Baseline Artifact Path Changes:

  • Changed the storage path for baseline artifacts to use baselines-commitish instead of baselines, improving organization and clarity of stored artifacts. [1] [2]

Related issue(s):

Fixes #25492

@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented May 18, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@lfdt-bot
Copy link
Copy Markdown

lfdt-bot commented May 18, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@andrewb1269 andrewb1269 force-pushed the 25492-determinism-updates branch from 354d460 to 5508026 Compare May 18, 2026 12:32
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #25525   +/-   ##
=========================================
  Coverage     75.11%   75.11%           
  Complexity    11548    11548           
=========================================
  Files          2585     2585           
  Lines        101419   101419           
  Branches      11241    11241           
=========================================
  Hits          76179    76179           
  Misses        21335    21335           
  Partials       3905     3905           

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Andrew Brandt <andrew.brandt@hashgraph.com>
Signed-off-by: Andrew Brandt <andrew.brandt@hashgraph.com>
@andrewb1269 andrewb1269 force-pushed the 25492-determinism-updates branch from e2a41e2 to 32f1949 Compare May 19, 2026 19:05
@andrewb1269 andrewb1269 marked this pull request as ready for review May 20, 2026 14:03
@andrewb1269 andrewb1269 requested a review from a team as a code owner May 20, 2026 14:03
@andrewb1269 andrewb1269 requested a review from Copilot May 20, 2026 14:03
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 PR updates the Gradle and Docker build determinism verification workflows to avoid snapshot-style collisions by deriving a “commitish” prefix from the branch name and using it to set the Gradle project version before building, while also moving baseline artifacts into baselines-commitish paths (e.g., .github/workflows/zxc-verify-gradle-build-determinism.yaml:90-120, .github/workflows/zxc-verify-docker-build-determinism.yaml:99-164).

Changes:

  • Compute a normalized branch-based commit prefix and expose it as a step output (Gradle workflow: .github/workflows/zxc-verify-gradle-build-determinism.yaml:90-99 and 277-286; Docker workflow: .github/workflows/zxc-verify-docker-build-determinism.yaml:99-108).
  • Run ./gradlew versionAsPrefixedCommit with the computed prefix before assembling artifacts (Gradle workflow: 117-124 and 287-292; Docker workflow: 158-165).
  • Store/read baselines under .../baselines-commitish instead of .../baselines (Gradle workflow: 103-105; Docker workflow: 112-114).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/zxc-verify-gradle-build-determinism.yaml Adds branch-derived commit prefixing and applies it to Gradle versioning; moves GCS baseline location to baselines-commitish.
.github/workflows/zxc-verify-docker-build-determinism.yaml Adds branch-derived commit prefixing and applies it to Gradle versioning used for Docker build inputs; moves GCS baseline location to baselines-commitish.

Comment thread .github/workflows/zxc-verify-gradle-build-determinism.yaml Outdated
Comment thread .github/workflows/zxc-verify-gradle-build-determinism.yaml Outdated
Comment thread .github/workflows/zxc-verify-docker-build-determinism.yaml Outdated
andrewb1269 and others added 4 commits June 1, 2026 09:36
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andrew Brandt <andrew.brandt@hashgraph.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andrew Brandt <andrew.brandt@hashgraph.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Andrew Brandt <andrew.brandt@hashgraph.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.

Migrate from using the version.txt file to using committish artifacts for gradle/docker determinism

3 participants