-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Refuse to load the Jenkins test harness in production #8714
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.
The change makes sense to me. The memory leaks that result from loading the test harness into a production server are too high impact for us to load the harness silently.
This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback. /label ready-for-merge |
jenkinsci/jenkins#8714 included in Jenkins 2.434 and later will refuse to load a plugin that includes the Jenkins test harness. The Jenkins test harness causes unexpected failures when it is included in a Jenkins plugin. Refer to the following issue reports for examples: * https://issues.jenkins.io/browse/JENKINS-65650 * https://issues.jenkins.io/browse/JENKINS-66060 * https://issues.jenkins.io/browse/JENKINS-72353 The additional benefit of the change is that it makes the plugin hpi file over 80% smaller. Before this change, the plugin hpi file had the following contents: 1136 META-INF/MANIFEST.MF 73 META-INF/maven/org.jenkins-ci.plugins/applitools-eyes/pom.properties 3153 META-INF/maven/org.jenkins-ci.plugins/applitools-eyes/pom.xml 34814 WEB-INF/lib/applitools-eyes.jar 353793 WEB-INF/lib/commons-codec-1.15.jar 588337 WEB-INF/lib/commons-collections-3.2.2.jar 327135 WEB-INF/lib/commons-io-2.11.0.jar 434678 WEB-INF/lib/commons-lang3-3.4.jar 380196 WEB-INF/lib/cssparser-0.9.16.jar 767140 WEB-INF/lib/httpclient-4.5.6.jar 326356 WEB-INF/lib/httpcore-4.4.10.jar 4079701 WEB-INF/lib/jenkins-test-harness-htmlunit-2.18-1.jar 108240 WEB-INF/lib/jetty-io-9.2.12.v20150709.jar 357855 WEB-INF/lib/jetty-util-9.2.12.v20150709.jar 125315 WEB-INF/lib/nekohtml-1.9.22.jar 15808 WEB-INF/lib/sac-1.3.jar 276420 WEB-INF/lib/serializer-2.7.2.jar 43776 WEB-INF/lib/websocket-api-9.2.12.v20150709.jar 36264 WEB-INF/lib/websocket-client-9.2.12.v20150709.jar 179845 WEB-INF/lib/websocket-common-9.2.12.v20150709.jar 3154938 WEB-INF/lib/xalan-2.7.2.jar 1367760 WEB-INF/lib/xercesImpl-2.11.0.jar 220536 WEB-INF/lib/xml-apis-1.4.01.jar 10963 WEB-INF/licenses.xml After this change, the plugin hpi file has the following contents: 1136 META-INF/MANIFEST.MF 73 META-INF/maven/org.jenkins-ci.plugins/applitools-eyes/pom.properties 2951 META-INF/maven/org.jenkins-ci.plugins/applitools-eyes/pom.xml 34479 WEB-INF/lib/applitools-eyes.jar 353793 WEB-INF/lib/commons-codec-1.15.jar 767140 WEB-INF/lib/httpclient-4.5.6.jar 326356 WEB-INF/lib/httpcore-4.4.10.jar 1814 WEB-INF/licenses.xml
jenkinsci/jenkins#8714 included in Jenkins 2.434 and later will refuse to load a plugin that includes the Jenkins test harness. The Jenkins test harness causes unexpected failures when it is included in a Jenkins plugin. Refer to the following issue reports for examples: * https://issues.jenkins.io/browse/JENKINS-65650 * https://issues.jenkins.io/browse/JENKINS-66060 * https://issues.jenkins.io/browse/JENKINS-72353 The additional benefit of the change is that it makes the plugin hpi file over 90% smaller. Before this change, the plugin hpi file had the following contents: 61162 BuildStepController.js 41450 DlistActions.js 40183 images/bmc_build_step.jpg 374726 images/dlp_plugin.jpg 33108 images/plugin_version.jpg 42957 images/workspace.jpg 737 META-INF/MANIFEST.MF 81 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.properties 4254 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.xml 81188 WEB-INF/lib/bmc-change-manager-imstm.jar 1692782 WEB-INF/lib/commons-math3-3.2.jar 307305 WEB-INF/lib/commons-net-3.8.0.jar 98115 WEB-INF/lib/dec-0.1.2.jar 160975 WEB-INF/lib/embedded-rhino-debugger-1.2.jar 123360 WEB-INF/lib/hamcrest-2.2.jar 1499 WEB-INF/lib/hamcrest-core-2.2.jar 1537 WEB-INF/lib/hamcrest-library-2.2.jar 56674 WEB-INF/lib/javax.activation-api-1.2.0.jar 128032 WEB-INF/lib/jaxb-api-2.4.0-b180830.0359.jar 426248 WEB-INF/lib/jenkins-test-harness-1802.v9de0d87365d2.jar 10958672 WEB-INF/lib/jenkins-test-harness-htmlunit-106.vc41185ea_3d3d.jar 325897 WEB-INF/lib/jetty-client-9.4.48.v20220622.jar 234754 WEB-INF/lib/jetty-http-9.4.48.v20220622.jar 183018 WEB-INF/lib/jetty-io-9.4.48.v20220622.jar 118511 WEB-INF/lib/jetty-security-9.4.48.v20220622.jar 732200 WEB-INF/lib/jetty-server-9.4.48.v20220622.jar 146081 WEB-INF/lib/jetty-servlet-9.4.48.v20220622.jar 582975 WEB-INF/lib/jetty-util-9.4.48.v20220622.jar 66654 WEB-INF/lib/jetty-util-ajax-9.4.48.v20220622.jar 140320 WEB-INF/lib/jetty-webapp-9.4.48.v20220622.jar 68301 WEB-INF/lib/jetty-xml-9.4.48.v20220622.jar 541449 WEB-INF/lib/jmh-core-1.35.jar 31277 WEB-INF/lib/jmh-generator-annprocess-1.35.jar 78146 WEB-INF/lib/jopt-simple-5.0.4.jar 65966 WEB-INF/lib/json-20200518.jar 187400 WEB-INF/lib/org-netbeans-insane-RELEASE140.jar 65728 WEB-INF/lib/salvation2-3.0.0.jar 6884 WEB-INF/lib/support-log-formatter-1.1.jar 2699 WEB-INF/lib/symbol-annotation-1.23.jar 52173 WEB-INF/lib/websocket-api-9.4.48.v20220622.jar 45622 WEB-INF/lib/websocket-client-9.4.48.v20220622.jar 214632 WEB-INF/lib/websocket-common-9.4.48.v20220622.jar 45510 WEB-INF/lib/websocket-server-9.4.48.v20220622.jar 30315 WEB-INF/lib/websocket-servlet-9.4.48.v20220622.jar 15495 WEB-INF/licenses.xml After this change, the plugin hpi file has the following contents: 61162 BuildStepController.js 41450 DlistActions.js 40183 images/bmc_build_step.jpg 374726 images/dlp_plugin.jpg 33108 images/plugin_version.jpg 42957 images/workspace.jpg 767 META-INF/MANIFEST.MF 80 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.properties 4048 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.xml 81282 WEB-INF/lib/bmc-change-manager-imstm.jar 56674 WEB-INF/lib/javax.activation-api-1.2.0.jar 128032 WEB-INF/lib/jaxb-api-2.4.0-b180830.0359.jar 65966 WEB-INF/lib/json-20200518.jar 2699 WEB-INF/lib/symbol-annotation-1.23.jar 2466 WEB-INF/licenses.xml
jenkinsci/jenkins#8714 included in Jenkins 2.434 and later will refuse to load a plugin that includes the Jenkins test harness. The Jenkins test harness causes unexpected failures when it is included in a Jenkins plugin. Refer to the following issue reports for examples: * https://issues.jenkins.io/browse/JENKINS-65650 * https://issues.jenkins.io/browse/JENKINS-66060 * https://issues.jenkins.io/browse/JENKINS-72353 The additional benefit of the change is that it makes the plugin hpi file over 90% smaller. Before this change, the plugin hpi file had the following contents: 1680 images/docker.svg 765 META-INF/MANIFEST.MF 84 META-INF/maven/io.jenkins.plugins/container-image-link/pom.properties 5342 META-INF/maven/io.jenkins.plugins/container-image-link/pom.xml 327135 WEB-INF/lib/commons-io-2.11.0.jar 307305 WEB-INF/lib/commons-net-3.8.0.jar 13633 WEB-INF/lib/container-image-link.jar 9277 WEB-INF/lib/crypto-util-1.5.jar 98115 WEB-INF/lib/dec-0.1.2.jar 10579074 WEB-INF/lib/jenkins-test-harness-htmlunit-66.v712ea44bccba.jar 65728 WEB-INF/lib/salvation2-3.0.0.jar 276420 WEB-INF/lib/serializer-2.7.2.jar 220536 WEB-INF/lib/xml-apis-1.4.01.jar 6546 WEB-INF/licenses.xml After this change, the plugin hpi file has the following contents: 1680 images/docker.svg 816 META-INF/MANIFEST.MF 83 META-INF/maven/io.jenkins.plugins/container-image-link/pom.properties 5320 META-INF/maven/io.jenkins.plugins/container-image-link/pom.xml 327135 WEB-INF/lib/commons-io-2.11.0.jar 13661 WEB-INF/lib/container-image-link.jar 9277 WEB-INF/lib/crypto-util-1.5.jar 3444 WEB-INF/licenses.xml
Also removes Jenkins test harness from the plugin packaging DOES NOT FIX THE INCORRECT MODIFICATION OF ARTIFACT ID jenkinsci#1 needs partial revert to restore original artifact ID and package ID. Remove Jenkins test harness HTMLUnit from the plugin hpi file jenkinsci/jenkins#8714 included in Jenkins 2.434 and later will refuse to load a plugin that includes the Jenkins test harness. The Jenkins test harness causes unexpected failures when it is included in a Jenkins plugin. Refer to the following issue reports for examples: * https://issues.jenkins.io/browse/JENKINS-65650 * https://issues.jenkins.io/browse/JENKINS-66060 * https://issues.jenkins.io/browse/JENKINS-72353 The additional benefit of the change is that it makes the plugin hpi file over 80% smaller.
jenkinsci/jenkins#8714 included in Jenkins 2.434 and later will refuse to load a plugin that includes the Jenkins test harness. The Jenkins test harness causes unexpected failures when it is included in a Jenkins plugin. Refer to the following issue reports for examples: * https://issues.jenkins.io/browse/JENKINS-65650 * https://issues.jenkins.io/browse/JENKINS-66060 * https://issues.jenkins.io/browse/JENKINS-72353 The additional benefit of the change is that it makes the plugin hpi file over 90% smaller. Before this change, the plugin hpi file had the following contents: 61162 BuildStepController.js 41450 DlistActions.js 40183 images/bmc_build_step.jpg 374726 images/dlp_plugin.jpg 33108 images/plugin_version.jpg 42957 images/workspace.jpg 737 META-INF/MANIFEST.MF 81 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.properties 4254 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.xml 81188 WEB-INF/lib/bmc-change-manager-imstm.jar 1692782 WEB-INF/lib/commons-math3-3.2.jar 307305 WEB-INF/lib/commons-net-3.8.0.jar 98115 WEB-INF/lib/dec-0.1.2.jar 160975 WEB-INF/lib/embedded-rhino-debugger-1.2.jar 123360 WEB-INF/lib/hamcrest-2.2.jar 1499 WEB-INF/lib/hamcrest-core-2.2.jar 1537 WEB-INF/lib/hamcrest-library-2.2.jar 56674 WEB-INF/lib/javax.activation-api-1.2.0.jar 128032 WEB-INF/lib/jaxb-api-2.4.0-b180830.0359.jar 426248 WEB-INF/lib/jenkins-test-harness-1802.v9de0d87365d2.jar 10958672 WEB-INF/lib/jenkins-test-harness-htmlunit-106.vc41185ea_3d3d.jar 325897 WEB-INF/lib/jetty-client-9.4.48.v20220622.jar 234754 WEB-INF/lib/jetty-http-9.4.48.v20220622.jar 183018 WEB-INF/lib/jetty-io-9.4.48.v20220622.jar 118511 WEB-INF/lib/jetty-security-9.4.48.v20220622.jar 732200 WEB-INF/lib/jetty-server-9.4.48.v20220622.jar 146081 WEB-INF/lib/jetty-servlet-9.4.48.v20220622.jar 582975 WEB-INF/lib/jetty-util-9.4.48.v20220622.jar 66654 WEB-INF/lib/jetty-util-ajax-9.4.48.v20220622.jar 140320 WEB-INF/lib/jetty-webapp-9.4.48.v20220622.jar 68301 WEB-INF/lib/jetty-xml-9.4.48.v20220622.jar 541449 WEB-INF/lib/jmh-core-1.35.jar 31277 WEB-INF/lib/jmh-generator-annprocess-1.35.jar 78146 WEB-INF/lib/jopt-simple-5.0.4.jar 65966 WEB-INF/lib/json-20200518.jar 187400 WEB-INF/lib/org-netbeans-insane-RELEASE140.jar 65728 WEB-INF/lib/salvation2-3.0.0.jar 6884 WEB-INF/lib/support-log-formatter-1.1.jar 2699 WEB-INF/lib/symbol-annotation-1.23.jar 52173 WEB-INF/lib/websocket-api-9.4.48.v20220622.jar 45622 WEB-INF/lib/websocket-client-9.4.48.v20220622.jar 214632 WEB-INF/lib/websocket-common-9.4.48.v20220622.jar 45510 WEB-INF/lib/websocket-server-9.4.48.v20220622.jar 30315 WEB-INF/lib/websocket-servlet-9.4.48.v20220622.jar 15495 WEB-INF/licenses.xml After this change, the plugin hpi file has the following contents: 61162 BuildStepController.js 41450 DlistActions.js 40183 images/bmc_build_step.jpg 374726 images/dlp_plugin.jpg 33108 images/plugin_version.jpg 42957 images/workspace.jpg 767 META-INF/MANIFEST.MF 80 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.properties 4048 META-INF/maven/com.bmc.ims/bmc-change-manager-imstm/pom.xml 81282 WEB-INF/lib/bmc-change-manager-imstm.jar 56674 WEB-INF/lib/javax.activation-api-1.2.0.jar 128032 WEB-INF/lib/jaxb-api-2.4.0-b180830.0359.jar 65966 WEB-INF/lib/json-20200518.jar 2699 WEB-INF/lib/symbol-annotation-1.23.jar 2466 WEB-INF/licenses.xml
See JENKINS-65650, JENKINS-66060, and JENKINS-72353. Fail fast, informing the user which plugin is broken, rather than continuing execution with a known broken configuration. More aggressive enforcement of what should become a non-issue after jenkinsci/plugin-pom#864. If people feel this PR is overkill, this PR can simply be closed.
Testing done
Verified that the exception was thrown both from the (currently broken)
build-pipeline-plugin
'sInjectedTest
and from ajava -jar jenkins.war
invocation withbuild-pipeline-plugin
, which printed:Proposed changelog entries
Proposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist