Source-distribution builds leave `${buildNumber}` unresolved in version metadata
- Ngôn ngữ chính
- Java
- Star
- 3.1k
- Fork
- 1.6k
- Merge trung bình
- 3 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 33
Mô tả
Building Parquet directly from the ASF source distribution cannot obtain the Git revision because the archive contains no `.git` metadata. Maven records a null `buildNumber`, leaving the placeholder unresolved in generated version information.
### Reproduction
Download and extract the source tarball from the [1.18.0 RC1 directory](https://dist.apache.org/repos/dist/dev/parquet/apache-parquet-1.18.0-rc1/), then run:
```bash
./mvnw -f parquet-generator/pom.xml package -DskipTests
tmp_dir=$(mktemp -d)
java -cp parquet-generator/target/parquet-generator-1.18.0.jar \
org.apache.parquet.version.VersionGenerator "$tmp_dir"
grep FULL_VERSION "$tmp_dir/org/apache/parquet/Version.java"
```
Result:
```text
parquet-mr version 1.18.0 (build ${buildNumber})
```
The JAR manifest’s `git-SHA-1` entry is also blank. In contrast, the [staged Maven JARs](https://repository.apache.org/content/repositories/orgapacheparquet-1081/org/apache/parquet/) correctly contain RC1 commit [`5e2ad0969c7f411613671c5ef054d399995de5f9`](https://github.com/apache/parquet-java/commit/5e2ad0969c7f411613671c5ef054d399995de5f9).
This also reproduces with the official [1.17.0 source distribution](https://archive.apache.org/dist/parquet/apache-parquet-1.17.0/), while the published 1.17.0 Maven JARs correctly contain release commit `fac0c746532e133beb928a7f6a7e57b510b477a1`. Therefore, this predates 1.18.0 and is not an RC1 regression.
### Impact
Source-built artifacts have incomplete or misleading provenance:
- `Version.FULL_VERSION` contains the unresolved placeholder.
- Parquet files written by those artifacts may include it in `created_by`.
- The manifest lacks the Git SHA.
- Source-built and staged artifacts report different build identities.
The build should embed the release commit or use an explicit fallback rather than emitting an unresolved Maven expression.
Relevant source: [`parquet-version.properties`](https://github.com/apache/parquet-java/blob/apache-parquet-1.18.0-rc1/parquet-generator/src/main/resources/parquet-version.properties).
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu với parquet-generator/src/main/resources/parquet-version.properties và tái hiện vấn đề bằng lệnh ./mvnw được cung cấp cùng lệnh gọi VersionGenerator. Kiểm tra Version.java được tạo và manifest của JAR; hoàn tất khi các bản build của bản phân phối mã nguồn không còn xuất ra placeholder ${buildNumber} chưa được phân giải và bao gồm build identity phù hợp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, java
- Lĩnh vực
- build-system, release
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100