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

8335912: Add an operation mode to the jar command when extracting to not overwriting existing files #1177

Closed
wants to merge 1 commit into from

Conversation

alexeybakhtin
Copy link

@alexeybakhtin alexeybakhtin commented Nov 22, 2024

Clean backport of jar tool enhancement from JDK23

JTREG tests passed


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
  • Change requires CSR request JDK-8344651 to be approved
  • JDK-8335912 needs maintainer approval

Issues

  • JDK-8335912: Add an operation mode to the jar command when extracting to not overwriting existing files (Enhancement - P5 - Approved)
  • JDK-8344651: Add an operation mode to the jar command when extracting to not overwriting existing files (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1177

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 22, 2024

👋 Welcome back abakhtin! 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.

@openjdk
Copy link

openjdk bot commented Nov 22, 2024

@alexeybakhtin 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:

8335912: Add an operation mode to the jar command when extracting to not overwriting existing files

Reviewed-by: henryjen, goetz, mbalao

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 14 new commits pushed to the master branch:

  • 3f648b4: 8342905: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501 redux
  • 96a3a88: 8344993: [21u] [REDO] Backport JDK-8327501 and JDK-8328366 to JDK 21
  • d383ba5: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order
  • e569997: 8344628: Test TestEnableJVMCIProduct.java run with virtual thread intermittent fails
  • 92aa77c: 8343285: java.lang.Process is unresponsive and CPU usage spikes to 100%
  • 046c4aa: 8334475: UnsafeIntrinsicsTest.java#ZGenerationalDebug assert(!assert_on_failure) failed: Has low-order bits set
  • a803b5a: 8342409: [s390x] C1 unwind_handler fails to unlock synchronized methods with LM_MONITOR
  • 5ac01de: 8345055: [21u] ProblemList failing rtm tests on ppc platforms
  • 6b9ef8d: 8325906: Problemlist vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java#id1 until JDK-8320865 is fixed
  • 2dd7317: 8333427: langtools/tools/javac/newlines/NewLineTest.java is failing on Japanese Windows
  • ... and 4 more: https://git.openjdk.org/jdk21u-dev/compare/ef5702e7f4be11ab3f3b7d74b98cf9aa628829f7...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title Backport 158b93d19a518d2b9d3d185e2d4c4dbff9c82aab 8335912: Add an operation mode to the jar command when extracting to not overwriting existing files Nov 22, 2024
@openjdk
Copy link

openjdk bot commented Nov 22, 2024

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Nov 22, 2024
@mlbridge
Copy link

mlbridge bot commented Nov 22, 2024

Webrevs

Copy link

@slowhog slowhog left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk openjdk bot added the approval label Nov 23, 2024
@openjdk openjdk bot removed the approval label Dec 3, 2024
@alexeybakhtin
Copy link
Author

LGTM

@slowhog, Thank you for review.
Can anybody with review status accept it also?

Copy link
Member

@GoeLin GoeLin left a comment

Choose a reason for hiding this comment

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

This is the same change as the pull request targeted to 23. (Not really a clean backport, as the PR for 23 was never pushed.)
Wrt. to the head version it adds the enum OptionType.EXTRACT, which is needed to implement flags applicable in addition to the parameter or mode "extract". JDK-8173970 adds a different flag, independent of this one. So it's a good idea to reuse this code snippet. Besides this the change is identical to head.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 3, 2024
@GoeLin
Copy link
Member

GoeLin commented Dec 3, 2024

GHA failure
One is the well known wget error, unrelated.
The other is a jtreg failure, serviceability/sa/CDSJMapClstats.java fails.
ACtually it throws SIGBUS, and then terminates with
IOException: LingeredApp terminated with non-zero exit code 137

I would not expect this change to affect CDSJMapClstats, but please have a second look and best restart this test.

Copy link
Contributor

@martinuy martinuy left a comment

Choose a reason for hiding this comment

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

Thanks for this contribution. Looks good to me.

@alexeybakhtin
Copy link
Author

GHA failure One is the well known wget error, unrelated. The other is a jtreg failure, serviceability/sa/CDSJMapClstats.java fails. ACtually it throws SIGBUS, and then terminates with IOException: LingeredApp terminated with non-zero exit code 137

I would not expect this change to affect CDSJMapClstats, but please have a second look and best restart this test.

Thank you for the review!
The tests are passed after the restart. I do not think the previous failure was caused by these changes.

@alexeybakhtin
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Dec 4, 2024

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

  • 3f648b4: 8342905: Thread.setContextClassloader from thread in FJP commonPool task no longer works after JDK-8327501 redux
  • 96a3a88: 8344993: [21u] [REDO] Backport JDK-8327501 and JDK-8328366 to JDK 21
  • d383ba5: 8322809: SystemModulesMap::classNames and moduleNames arrays do not match the order
  • e569997: 8344628: Test TestEnableJVMCIProduct.java run with virtual thread intermittent fails
  • 92aa77c: 8343285: java.lang.Process is unresponsive and CPU usage spikes to 100%
  • 046c4aa: 8334475: UnsafeIntrinsicsTest.java#ZGenerationalDebug assert(!assert_on_failure) failed: Has low-order bits set
  • a803b5a: 8342409: [s390x] C1 unwind_handler fails to unlock synchronized methods with LM_MONITOR
  • 5ac01de: 8345055: [21u] ProblemList failing rtm tests on ppc platforms
  • 6b9ef8d: 8325906: Problemlist vmTestbase/vm/mlvm/meth/stress/compiler/deoptimize/Test.java#id1 until JDK-8320865 is fixed
  • 2dd7317: 8333427: langtools/tools/javac/newlines/NewLineTest.java is failing on Japanese Windows
  • ... and 4 more: https://git.openjdk.org/jdk21u-dev/compare/ef5702e7f4be11ab3f3b7d74b98cf9aa628829f7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 4, 2024
@openjdk openjdk bot closed this Dec 4, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 4, 2024
@openjdk
Copy link

openjdk bot commented Dec 4, 2024

@alexeybakhtin Pushed as commit e45287d.

💡 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.

None yet

4 participants