apache / apache/auron

[BUILD] auron-build.sh writes build info to the caller's directory and silently drops project.version

Open Beginner friendly
#2,459 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
1.8k
Forks
241
Avg merge
2d 14h
Merged PRs (30d)
22

Description

**Describe the bug**

Running `auron-build.sh` from anywhere other than the project root fails in two quiet ways:

1. `auron-build-info.properties` gets written under the current directory instead of the project, so the build never picks it up and the resource is missing from the jar.
2. `project.version` is left out of the file, because the command that looks it up fails and the error is discarded.

Neither one stops the build. It runs to completion and produces a jar where `AuronBuildInfo.VERSION` is empty.

**To Reproduce**

Steps to reproduce the behavior:

1. `mkdir -p /tmp/elsewhere && cd /tmp/elsewhere`
2. `bash /path/to/auron/auron-build.sh --release --sparkver 3.1 --scalaver 2.12`
3. Look at the build configuration the script prints
4. Check `/tmp/elsewhere/common/src/main/resources/auron-build-info.properties`

```
[INFO] Build configuration (from common/src/main/resources/auron-build-info.properties):
[INFO] spark.version : 3.1
[INFO] rust.version : 1.97.1
[INFO] java.version : 17.0.19
[INFO] scala.version : 2.12
[INFO] build.timestamp : 2026-08-08T23:32:59Z
auron-build.sh: line 611: /tmp/elsewhere/build/mvn: No such file or directory
```

`project.version` is missing from that list, and the file itself was created under `/tmp/elsewhere` rather than in the project.

**Expected behavior**

The build info file should land in the project regardless of where the script is invoked from, `project.version` should always be set, and a failure to resolve it should stop the build rather than produce a jar with no version in it.

**Screenshots**

N/A

**Additional context**

Three separate one-line causes, all on master:

- `auron-build.sh:526` sets `BUILD_INFO_FILE` relative to the current directory rather than to the script.
- `auron-build.sh:530` runs `./build/mvn` directly instead of the `MVN_CMD` that was already resolved back at line 153.
- That same line sends stderr to `/dev/null`, and the write loop at line 565 only writes non-empty values, so the failure never shows up in the output or in the file.

Resolving the paths from `BASH_SOURCE`, reusing `MVN_CMD`, and failing when the version can't be resolved would cover all three.

Contributor guide

Open the contributing guide

Research direction

Start with auron-build.sh at lines 526, 530, and 565, then run the documented command from /tmp/elsewhere. Verify that the properties file is created under the project, project.version is populated, and an unresolved version stops the build instead of producing an incomplete jar.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.