Skip to content
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

8273092: Sort classlist in JDK image #1632

Conversation

andrew-m-leonard
Copy link

@andrew-m-leonard andrew-m-leonard commented Jul 28, 2023

Backport 8273092: Sort classlist in JDK image
to jdk17u so that classlist order is deterministic for reproducible builds.

The original needed modifying, because jdk17u does not dump ":id" Klass id, it just dumps the class/lambda name.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8273092: Sort classlist in JDK image (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/1632/head:pull/1632
$ git checkout pull/1632

Update a local copy of the PR:
$ git checkout pull/1632
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/1632/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1632

View PR using the GUI difftool:
$ git pr show -t 1632

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/1632.diff

Webrev

Link to Webrev Comment

duke and others added 2 commits July 28, 2023 13:47
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 28, 2023

👋 Welcome back aleonard! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

Signed-off-by: Andrew Leonard <anleonar@redhat.com>
@andrew-m-leonard
Copy link
Author

/issue JDK-8273092

@openjdk openjdk bot changed the title Andrew m leonard backport 1996f649 8273092: Sort classlist in JDK image Jul 28, 2023
@openjdk
Copy link

openjdk bot commented Jul 28, 2023

@andrew-m-leonard The primary solved issue for a PR is set through the PR title. Since the current title does not contain an issue reference, it will now be updated.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 28, 2023
@andrew-m-leonard andrew-m-leonard changed the title 8273092: Sort classlist in JDK image Backport 1996f649a3a30b7ac4b547a762417f807f5fa414 Jul 28, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 28, 2023

Webrevs

@openjdk openjdk bot changed the title Backport 1996f649a3a30b7ac4b547a762417f807f5fa414 8273092: Sort classlist in JDK image Jul 28, 2023
@openjdk
Copy link

openjdk bot commented Jul 28, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport label Jul 28, 2023
@andrew-m-leonard
Copy link
Author

I've performed local builds with this PR, and compared with original classlist to ensure it is identical but now sorted.

@andrew-m-leonard
Copy link
Author

Hi @iklam , would you be able to review this backport of your original classlist sorting please? thanks

@iklam
Copy link
Member

iklam commented Aug 2, 2023

Hi @iklam , would you be able to review this backport of your original classlist sorting please? thanks

Hmm, I am not sure why this backport is necessary.

@andrew-m-leonard
Copy link
Author

Hi @iklam , would you be able to review this backport of your original classlist sorting please? thanks

Hmm, I am not sure why this backport is necessary.

@iklam The classlist file ordering is seemingly random, and thus 2 builds of the same code produces classlist files that differ.

@iklam
Copy link
Member

iklam commented Aug 3, 2023

Hi @iklam , would you be able to review this backport of your original classlist sorting please? thanks

Hmm, I am not sure why this backport is necessary.

@iklam The classlist file ordering is seemingly random, and thus 2 builds of the same code produces classlist files that differ.

Is the goal for reproducible builds? Backporting this change alone isn't enough. The following are needed:

https://bugs.openjdk.org/issues/?jql=labels%20%3D%20reproducible-build%20AND%20labels%20%3D%20cds%20ORDER%20BY%20fixVersion%20ASC

However, the CDS code has changed significantly since JDK 17, so backporting will be very difficult.

Please follow https://wiki.openjdk.org/display/JDKUpdates/How+to+contribute+or+backport+a+fix and have a discussion on the jdk-updates-dev mailing list before proceeding.

@andrew-m-leonard
Copy link
Author

Hi @iklam , would you be able to review this backport of your original classlist sorting please? thanks

Hmm, I am not sure why this backport is necessary.

@iklam The classlist file ordering is seemingly random, and thus 2 builds of the same code produces classlist files that differ.

Is the goal for reproducible builds? Backporting this change alone isn't enough. The following are needed:

https://bugs.openjdk.org/issues/?jql=labels%20%3D%20reproducible-build%20AND%20labels%20%3D%20cds%20ORDER%20BY%20fixVersion%20ASC

However, the CDS code has changed significantly since JDK 17, so backporting will be very difficult.

Please follow https://wiki.openjdk.org/display/JDKUpdates/How+to+contribute+or+backport+a+fix and have a discussion on the jdk-updates-dev mailing list before proceeding.

Thanks @iklam will do

@openjdk
Copy link

openjdk bot commented Aug 8, 2023

@andrew-m-leonard This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8273092: Sort classlist in JDK image

Reviewed-by: aph

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 17 new commits pushed to the master branch:

  • fe9b7c6: 8255548: Missing coverage for javax.xml.crypto.dom.DOMCryptoContext
  • 242513f: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports
  • 3d86810: 8307079: Update test java/awt/Choice/DragOffNoSelect.java
  • 8aad696: 8301167: Update VerifySignedJar to actually exercise and test verification
  • fe3920e: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs
  • ec2abc2: 8302182: Update Public Suffix List to 88467c9
  • 9c8731b: 8309095: Remove UTF-8 character from TaskbarPositionTest.java
  • 4786a00: 8267860: Off-by-one bug when searching arrays in AlpnGreaseTest
  • 2f5a952: 8195589: T6587786.java failed after JDK-8189997
  • 6349de6: 8289797: tools/launcher/I18NArgTest.java fails on Japanese Windows environment
  • ... and 7 more: https://git.openjdk.org/jdk17u-dev/compare/aaf47b38d7996cfc65f59bfe7d1f7d767c184913...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@theRealAph) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 8, 2023
@andrew-m-leonard
Copy link
Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 10, 2023
@openjdk
Copy link

openjdk bot commented Aug 10, 2023

@andrew-m-leonard
Your change (at version 01cbefd) is now ready to be sponsored by a Committer.

@tstuefe
Copy link
Member

tstuefe commented Aug 10, 2023

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 10, 2023

Going to push as commit 762c351.
Since your change was applied there have been 17 commits pushed to the master branch:

  • fe9b7c6: 8255548: Missing coverage for javax.xml.crypto.dom.DOMCryptoContext
  • 242513f: 6381945: (cal) Japanese calendar unit test system should avoid multiple static imports
  • 3d86810: 8307079: Update test java/awt/Choice/DragOffNoSelect.java
  • 8aad696: 8301167: Update VerifySignedJar to actually exercise and test verification
  • fe3920e: 8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs
  • ec2abc2: 8302182: Update Public Suffix List to 88467c9
  • 9c8731b: 8309095: Remove UTF-8 character from TaskbarPositionTest.java
  • 4786a00: 8267860: Off-by-one bug when searching arrays in AlpnGreaseTest
  • 2f5a952: 8195589: T6587786.java failed after JDK-8189997
  • 6349de6: 8289797: tools/launcher/I18NArgTest.java fails on Japanese Windows environment
  • ... and 7 more: https://git.openjdk.org/jdk17u-dev/compare/aaf47b38d7996cfc65f59bfe7d1f7d767c184913...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 10, 2023
@openjdk openjdk bot closed this Aug 10, 2023
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 10, 2023
@openjdk openjdk bot removed rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Aug 10, 2023
@openjdk
Copy link

openjdk bot commented Aug 10, 2023

@tstuefe @andrew-m-leonard Pushed as commit 762c351.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants