Skip to content

fix: replace git hash with build number in UI footer#5153

Open
Ma77Ball wants to merge 2 commits into
apache:mainfrom
Ma77Ball:fix/removeUIGitHash
Open

fix: replace git hash with build number in UI footer#5153
Ma77Ball wants to merge 2 commits into
apache:mainfrom
Ma77Ball:fix/removeUIGitHash

Conversation

@Ma77Ball
Copy link
Copy Markdown
Contributor

@Ma77Ball Ma77Ball commented May 22, 2026

What changes were proposed in this PR?

  • Replaced frontend/git-version.js with frontend/build-version.js, which uses build-number-generator to stamp a version + timestamp build number instead of shelling out to git describe.
  • Swapped the git-describe devDependency for build-number-generator, and pointed the postinstall script at the new file.
  • Simplified src/environments/version.ts schema to { buildNumber, version }, since the old git-describe output fields had a single consumer.
  • Renamed DashboardComponent.gitCommitHash to buildNumber, updated the footer label to Build:, and renamed the #git-commit-id CSS id to #build-number.

Any related issues, documentation, or discussions?

closes: #3613

How was this PR tested?

  • Ran node build-version.js directly and confirmed it wrote a valid version.ts with the new buildNumber field.

Was this PR authored or co-authored using generative AI tooling?

Co-authored with Claude Opus 4.7 in compliance with ASF

@github-actions github-actions Bot added dependencies Pull requests that update a dependency file fix frontend Changes related to the frontend GUI labels May 22, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.34%. Comparing base (bf2f92c) to head (25a7e1a).

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5153      +/-   ##
============================================
- Coverage     43.36%   43.34%   -0.02%     
+ Complexity     2217     2212       -5     
============================================
  Files          1049     1049              
  Lines         40560    40560              
  Branches       4322     4322              
============================================
- Hits          17589    17582       -7     
- Misses        21883    21886       +3     
- Partials       1088     1092       +4     
Flag Coverage Δ *Carryforward flag
access-control-service 39.53% <ø> (ø) Carriedforward from 28cd12a
agent-service 33.76% <ø> (ø) Carriedforward from 28cd12a
amber 43.81% <ø> (-0.04%) ⬇️ Carriedforward from 28cd12a
computing-unit-managing-service 0.00% <ø> (ø) Carriedforward from 28cd12a
config-service 0.00% <ø> (ø) Carriedforward from 28cd12a
file-service 32.18% <ø> (ø) Carriedforward from 28cd12a
frontend 34.61% <100.00%> (ø)
python 90.50% <ø> (ø) Carriedforward from 28cd12a
workflow-compiling-service 56.81% <ø> (ø) Carriedforward from 28cd12a

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@Ma77Ball
Copy link
Copy Markdown
Contributor Author

/request-review @bobbai00

@github-actions github-actions Bot requested a review from bobbai00 May 22, 2026 15:58
@Yicong-Huang
Copy link
Copy Markdown
Contributor

For UI related PRs, please include UI screenshot as the change. Thanks

Comment thread frontend/package.json
Comment thread frontend/build-version.js
Comment on lines 21 to +25
const { version } = require("./package.json");
const { resolve, relative } = require("path");
const { writeFileSync, existsSync, mkdirSync } = require("fs-extra");

const gitInfo = gitDescribeSync({
dirtyMark: false,
dirtySemver: false,
});

gitInfo.version = version;
const buildNumber = generate(version);
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.

can we simply call this method in source code, instead of doing so in post install script? I think we can get rid of such a post install script.

Signed-off-by: Matthew B. <mgball@uci.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file fix frontend Changes related to the frontend GUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use build number to replace git hash display on the UI

3 participants