Skip to content

[AURON #2444] Add build branch and build reversion info - #2445

Merged
slfan1989 merged 4 commits into
apache:masterfrom
zhaohehuhu:dev-0730
Aug 28, 2026
Merged

[AURON #2444] Add build branch and build reversion info#2445
slfan1989 merged 4 commits into
apache:masterfrom
zhaohehuhu:dev-0730

Conversation

@zhaohehuhu

@zhaohehuhu zhaohehuhu commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2444

Rationale for this change

Auron build information currently includes component versions and build timestamp, but it does not identify the Git branch or commit used to produce the artifact. This makes it harder to trace a running application or built package back to the exact source revision.

What changes are included in this PR?

This PR adds Git branch and revision information to the Auron build info file.

Are there any user-facing changes?

No.

How was this patch tested?

Rebuild

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

  • Yes
  • No

@zhaohehuhu zhaohehuhu changed the title [Auron #2444]add build branch and build reversion info [Auron #2444] add build branch and build reversion info Jul 30, 2026
@zhaohehuhu zhaohehuhu changed the title [Auron #2444] add build branch and build reversion info [AURON #2444] add build branch and build reversion info Jul 30, 2026
@zhaohehuhu zhaohehuhu changed the title [AURON #2444] add build branch and build reversion info [AURON #2444] Add build branch and build reversion info Jul 30, 2026
@slfan1989 slfan1989 self-assigned this Jul 31, 2026
Comment thread auron-build.sh Outdated
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | awk '{print $3}' | tr -d '"')
PROJECT_VERSION=$(./build/mvn help:evaluate -N -Dexpression=project.version -Pspark-${SPARK_VER} -q -DforceStdout 2>/dev/null)
RUST_VERSION=$(rustc --version | awk '{print $2}')
BUILD_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)

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.

Thanks for the contribution! In the release workflows, actions/checkout checks out ${{ github.event.pull_request.head.sha }}, which leaves the repository in detached HEAD state. In that case, git rev-parse --abbrev-ref HEAD records HEAD rather than the actual source branch, so the branch metadata will not be useful for CI-built artifacts. Could we support an explicit build-branch environment variable, populated from github.head_ref/github.ref_name, and fall back to Git only for local builds? Please also make sure the value is forwarded into Docker builds.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks for reviewing! @slfan1989

Comment thread auron-build.sh
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | awk '{print $3}' | tr -d '"')
PROJECT_VERSION=$(./build/mvn help:evaluate -N -Dexpression=project.version -Pspark-${SPARK_VER} -q -DforceStdout 2>/dev/null)
RUST_VERSION=$(rustc --version | awk '{print $2}')
BUILD_BRANCH="${AURON_BUILD_BRANCH:-$(git rev-parse --abbrev-ref HEAD 2>/dev/null)}"

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.

Thanks for adding the override and forwarding it into Docker. However, none of the workflows currently sets AURON_BUILD_BRANCH, so release jobs that check out ${{ github.event.pull_request.head.sha }} still fall back to git rev-parse and record build.branch=HEAD. Please populate the override in the relevant workflows, for example with ${{ github.head_ref || github.ref_name }}. The revision override could similarly use ${{ github.event.pull_request.head.sha || github.sha }} to make the recorded source explicit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for reviewing! @slfan1989

@github-actions github-actions Bot added the infra label Aug 17, 2026
@zhaohehuhu
zhaohehuhu requested a review from slfan1989 August 17, 2026 06:03

- name: Build auron-${{ matrix.sparkver }}_${{ matrix.scalaver }}
env:
AURON_BUILD_BRANCH: ${{ github.head_ref || github.ref_name }}

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.

These variables are not consumed because this job invokes build/mvn directly, while the build-info file is generated only by auron-build.sh. As a result, the ARM artifacts will still miss the branch and revision metadata. Could this job use auron-build.sh, or explicitly generate the build-info file before invoking Maven?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Got it. I’ve already updated the job to use auron-build.sh to build ARM artifacts. @slfan1989

Signed-off-by: zhaohehuhu <luoyedeyi@163.com>
Signed-off-by: zhaohehuhu <luoyedeyi@163.com>
Signed-off-by: zhaohehuhu <luoyedeyi@163.com>
Signed-off-by: zhaohehuhu <luoyedeyi@163.com>

fix

fix workflows

Signed-off-by: zhaohehuhu <luoyedeyi@163.com>

@slfan1989 slfan1989 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.

LGTM.

@slfan1989
slfan1989 merged commit 1d4d60d into apache:master Aug 28, 2026
170 checks passed
@slfan1989

Copy link
Copy Markdown
Contributor

@zhaohehuhu Thanks for the contribution! Merged into the master.

@zhaohehuhu
zhaohehuhu deleted the dev-0730 branch August 28, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Git branch and revision information to Auron build info

2 participants