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

Support plugin compatibility tester (PCT) #1327

Merged
merged 4 commits into from Aug 10, 2022
Merged

Conversation

basil
Copy link
Member

@basil basil commented Aug 8, 2022

Background

See jenkinsci/bom#1384 (comment).

Problem

When plugin compatibility tester (PCT) tests this plugin, it runs mvn […] hpi:resolve-test-dependencies hpi:test-hpl surefire:test failsafe:integration-test failsafe:integration-test, expecting all Jenkins plugins to have hpi:resolve-test-dependencies and hpi:test-hpl goals in all Maven modules. This plugin does not comply with the expectation, so PCT fails with:

[ERROR] No plugin found for prefix 'hpi' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/basil/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]

Solution

The parent POM layout of this plugin is highly non-standard and would benefit from being standardized. In the short term we simply add the maven-hpi-plugin to the two projects in the Maven multi-module build that do not already have it. This chases the PCT problem away.

CC @uhafner

Copy link
Member

@jglick jglick left a comment

@basil
Copy link
Member Author

basil commented Aug 9, 2022

Note also

Noted!

@codecov
Copy link

codecov bot commented Aug 9, 2022

Codecov Report

Merging #1327 (09e942e) into master (5e40665) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1327   +/-   ##
=========================================
  Coverage     79.78%   79.78%           
  Complexity     1448     1448           
=========================================
  Files           251      251           
  Lines          5611     5611           
  Branches        427      427           
=========================================
  Hits           4477     4477           
  Misses          983      983           
  Partials        151      151           

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@basil
Copy link
Member Author

basil commented Aug 9, 2022

Seeing lots of this in tests:

17:39:50  master00000|2022-08-09 00:39:49.624+0000 [id=80]	WARNING	o.j.p.w.cps.CpsFlowExecution#cleanUpHeap: failed to clean up memory from Owner[minimum_primary/2:minimum_primary #2]
17:39:50  master00000|java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.concurrent.ConcurrentMap (java.io.ObjectStreamClass$Caches$1 and java.util.concurrent.ConcurrentMap are in module java.base of loader 'bootstrap')
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.cleanUpObjectStreamClassCaches(CpsFlowExecution.java:1426)
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.cleanUpLoader(CpsFlowExecution.java:1321)
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.cleanUpHeap(CpsFlowExecution.java:1287)
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:447)
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$400(CpsThreadGroup.java:97)
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:315)
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:279)
17:39:50  master00000|	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67)
17:39:50  master00000|	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
17:39:50  master00000|	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:139)
17:39:50  master00000|	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:30)
17:39:50  master00000|	at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:70)
17:39:50  master00000|	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
17:39:50  master00000|	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
17:39:50  master00000|	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
17:39:50  master00000|	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
17:39:50  master00000|	at java.base/java.lang.Thread.run(Thread.java:829)

This was fixed in https://github.com/jenkinsci/workflow-cps-plugin/releases/tag/2660.2664.v4c114e93f4c1 and released in https://github.com/jenkinsci/bom/releases/tag/1577.v63609d9cb_5dc. This will need a PR like jenkinsci/analysis-pom-plugin#532 to be merged and released, then adopted here.

CC @uhafner

@basil
Copy link
Member Author

basil commented Aug 9, 2022

I guess that was just a warning and not an error, since the build passed:

https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/job/PR-1327/2/

Still didn't get an incremental, I will work on that. But I tested this locally and got the BOM build passing, so I think this is ready to merge and release from my perspective.

@basil
Copy link
Member Author

basil commented Aug 9, 2022

I gave up on incrementalifying this highly non-standard plugin.

ui-tests/pom.xml Outdated
@@ -16,7 +16,7 @@
<name>UI Tests of Warnings Plugin</name>

<properties>
<jenkins.version>2.361</jenkins.version>
<jenkins.version>2.362</jenkins.version>
Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry but we would like this for 2.361 😄 We want to do PCT testing of the next LTS release.

Copy link
Member

Choose a reason for hiding this comment

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

So you need a single release with this version? My UI tests are typically running vs the latest Jenkins baseline.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure this matters—I think this module would be ignored by PCT anyway?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, I'm not sure it matters either but a single release on 2.361 would be the safest option. I'll test this out in jenkinsci/bom#1384 once it's released (can't test before that due to lack of incremental).

Copy link
Member

Choose a reason for hiding this comment

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

I think incrementals does not work with plugins that have UI tests. I also would assume that it is sufficient to use the plugin submodule for the tests in PCT. For all my maven commands I am using cd plugin before I invoke them.

@uhafner uhafner merged commit 3b1cc69 into jenkinsci:master Aug 10, 2022
@jglick
Copy link
Member

jglick commented Aug 10, 2022

Thanks! Could you post a comment when this is released? (Alas, GitHub does not issue a notification to a watcher of a PR when it first appears in a release tag.)

@basil basil deleted the pct branch August 10, 2022 15:38
@uhafner
Copy link
Member

uhafner commented Aug 10, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants