-
Notifications
You must be signed in to change notification settings - Fork 196
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
[JENKINS-68092] Serialization of java.util.concurrent
data structure in Pipeline: Groovy
#518
Conversation
…e in Pipeline: Groovy
Similar to #515: normally this is serialized using JBoss Marshalling to |
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.
Seems fine. This should not be a performance bottleneck.
Note that builds running prior to the upgrade will continue to use ConcurrentSkipListMap
.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Outdated
Show resolved
Hide resolved
Testing doneWith commit 57ac3de and Java 17, ran:
|
The Java 8/11 CI build is green as well. |
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.
Suggested a somewhat shorter and arguably more legible variant, but the behavior should be the same.
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
It passed |
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.
Short and sweet.
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Outdated
Show resolved
Hide resolved
src/main/java/org/jenkinsci/plugins/workflow/cps/CpsThreadGroup.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
This comment was marked as resolved.
This comment was marked as resolved.
Successful Java 17 BOM run with the incremental from this PR and no |
Looks like an agent was disconnected from this build. Any chance someone could re-run it so that we might be able to get a release of this? |
Not much to be done until jenkins-infra/helpdesk#2849 is resolved. |
Better luck today? |
https://ci.jenkins.io/job/Plugins/job/workflow-cps-plugin/job/master/403/console still broken it seems. |
Steps to reproduce
On Java 17, run
mvn clean verify -Dtest=org.jenkinsci.plugins.workflow.cps.CpsBodyExecutionTest,org.jenkinsci.plugins.workflow.cps.CpsThreadDumpActionTest -Djenkins.version=2.339 -Denforcer.skip -Djenkins-test-harness.version=1723.vcd938b_e66072 '-DargLine=--add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED'
Expected results
Note: These are the actual results when adding
--add-opens java.base/java.util.concurrent=ALL-UNNAMED
to the above arguments:The test passes.
Actual results
The test fails with:
Evaluation
Of the core test suite and plugin BOM test suite, this is the only test failure I found with a
java.util.concurrent
reflection error. I think it would be desirable to eliminatejava.util.concurrent
from ourAdd-Opens
directives if possible, since in most cases it is not necessary to serialize a concurrent data structure.Solution
Interestingly enough, I found the tests passed by using a simple
TreeMap
wrapped inCollections.synchronizedNavigableMap
. If the performance costs are acceptable (and I think they likely are), I think it is worth considering making this change. This would allow me to get rid of thejava.util.concurrent
Add-Opens
directive in core'sMANIFEST.MF
in jenkinsci/jenkins#6392. Avoiding anyAdd-Opens
directives at this early preview stage is much easier than getting rid of them later on.Testing done
CCC @car-roll @dwnusbaum @jglick