-
Notifications
You must be signed in to change notification settings - Fork 126
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
Dynamically create the RealJenkinsRuleInit plugin #782
Dynamically create the RealJenkinsRuleInit plugin #782
Conversation
0f623ed
to
77215ac
Compare
Switch to dynamically creating the plugin used by RealJenkinsRule The plugin will have its Jenkis baseline set to the version of the war to ensure that no detached plugins are pulled in. Previously if the version of Jenkins used by RealJenkinsRuleInit has detached plugins in the version of Jenknis used for the test then this can uncessescarily pull in detached plugins. In most cases this is harmless, but in some cases these plugins may be prevented from running under the test (e.g. testing FIPS and one of the detached plugins like eddsa is not FIPS complaint and blocks startup). The plugin itself has limited exposure to the Jenkins api (via hudson.plugin.Plugin and RealJenkinsRule$Init2). Code running from the plugin tests inside RealJenkinsRule useis the uberClassloader and if the plugin was targetting a lower core (where the dependencies have been deteached, they should still be included as this change only affects the version of the RealJenkinsRuleInit plugin.
77215ac
to
9fc3c7d
Compare
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.
Looks perfect.
Name the classloader whilst we are here :)
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
This seems to break tests which deliberately run an older Jenkins version ( Edit: probably unnecessary; I found a workaround: call |
Switch to dynamically creating the plugin used by RealJenkinsRule
The plugin will have its Jenkis baseline set to the version of the war to ensure that no detached plugins are pulled in.
Previously if the version of Jenkins used by RealJenkinsRuleInit has detached plugins in the version of Jenknis used for the test then this can uncessescarily pull in detached plugins.
In most cases this is harmless, but in some cases these plugins may be prevented from running under the test (e.g. testing FIPS and one of the detached plugins like eddsa is not FIPS complaint and blocks startup).
The plugin itself has limited exposure to the Jenkins api (via hudson.plugin.Plugin and RealJenkinsRule$Init2).
Code running from the plugin tests inside RealJenkinsRule useis the uberClassloader and if the plugin was targetting a lower core (where the dependencies have been deteached, they should still be included as this change only affects the version of the RealJenkinsRuleInit plugin.
based on a suggestion by @jglick #780 (comment)
obsoletes: #781
Testing done
Submitter checklist