-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-39214: [Java] Support reproducible build #39215
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@lidavidm let me check why GH Action is not happy 😃 |
@github-actions crossbow submit java |
Revision: 502eb17 Submitted crossbow builds: ursacomputing/crossbow @ actions-b2f5994f24 |
java/format/pom.xml
Outdated
<properties> | ||
<project.build.outputTimestamp>2023-12-13T00:00:00Z</project.build.outputTimestamp> | ||
</properties> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide some commands or steps for validating a reproducible build, such as in the Arrow Format module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tried these commands, it finished ok with or without any changes:
$ mvn clean install
$ mvn clean verify artifact:compare
...
[INFO] Saved info on build to /Users/dsusanibar/fork/arrow/java/format/target/arrow-format-15.0.0-SNAPSHOT.buildinfo
[INFO] Checking against reference build from central...
[INFO] Reference buildinfo file not found: it will be generated from downloaded reference artifacts
[INFO] Reference build java.version: 11 (from MANIFEST.MF Build-Jdk-Spec)
[INFO] Reference build os.name: Unix (from pom.properties newline)
[INFO] Minimal buildinfo generated from downloaded artifacts: /Users/dsusanibar/fork/arrow/java/format/target/reference/arrow-format-15.0.0-SNAPSHOT.buildinfo
[INFO] Reproducible Build output summary: 5 files ok
[INFO] Reproducible Build output comparison saved to /Users/dsusanibar/fork/arrow/java/format/target/arrow-format-15.0.0-SNAPSHOT.buildcompare
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right for the check: mvn clean install and then mvn clean verify artifact:compare do a check.
This PR ensures we have reproducible build, not meaning that some module are not ok already (AFAIR, flight and algorithm were not reproducible).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also check with artifact:check-buildplan.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What we might want is to add this to CI somewhere (or possibly the release verification process) so we can make sure it stays working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lidavidm good idea. Let me check to add a workflow in GH actions.
FYI, I'm resuming work on this PR:
|
It might be best to add it to an existing workflow, or again, adding it to the release verification script even (what do you think @assignUser?) |
@lidavidm it makes sense, I do like this. Thanks ! |
How exactly does this work, it compares the current build against a reference build? How does that work for dev versions? We do have binary verification scripts so it would make sense to add it there, that would automatically also run it. |
https://maven.apache.org/plugins/maven-artifact-plugin/compare-mojo.html
So maybe we finally have a useful thing to do in the binary JAR verification step. |
@lidavidm yup, it's what I plan to do (and I used while working on this PR 😄 ). First I will fix the failing checks (AMD64 Conda Integration Test, etc). |
That's due to the Apache POM update. I will propose fix as part of this PR. |
See #39279 |
a65906a
to
fe22e18
Compare
@github-actions crossbow submit java |
|
Hmm well Archery doesn't like me but it seems CI still has a few issues even after a re-run. |
@lidavidm yup, to be honest, I don't know why it's failing 😄 I will probably try on |
@assignUser Could you take a look at #39215 (comment) and #39215 (comment) ? #39610 is related. |
@kou hm weird asf membership is public for David so the bot should pick it up... if this keeps happening we may need to add a non gh api based method to identify committers (e.g. committer list, IIRC we have a yaml one around somehwere right?) |
I fixed my membership after that. You may want to update the bot's error message to tell people what to do, I only knew because I happened to see someone else ask the same question in a private channel. |
I'm rebasing and doing new tests on this one. |
35de715
to
4f4343f
Compare
Co-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
…aven-assemly-plugin
@github-actions crossbow submit java |
Revision: e6e5d16 Submitted crossbow builds: ursacomputing/crossbow @ actions-02510129a8 |
@lidavidm as I'm back on Arrow, I'm resuming several PRs/works I have in progress 😄 Thanks ! |
@jbonofre need any help here? |
I can resume on this one yeah :) |
I'm back on Arrow. I will rebase and retest this PR. |
|
We're moving |
Rationale for this change
This PR add reproducible builds support.
Are these changes tested?
I tested the builds are reproducible on
arrow-vector
,arrow-memory
, ... usingmvn clean verify artifact:compare
.Are there any user-facing changes?
No