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
Do not load detached plugins during tests #2829
Conversation
Also warn about plugins which force us to create classes.jar.
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
…o.jenkins-ci.org so as to be able to test upstream component PRs.
Would be nice to understand how it will work together with #2754, which will likely require detached plugins at some point (e.g. moving the master-side Remoting protocol specifics to a remoting plugin). I would expect such (System?) detached plugins to be always loaded |
Not that I know of. Anyway this PR is only about tests, not production mode. |
I am +1 on the idea. On a brief look 4/5 test failures are related, though. |
Indeed it looks like this needs some test fixes. |
The unrelated failures are covered by INFRA-1141. |
Still have a test failure
|
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.
Kinda 🐜 for the upstream jenkinsci/jenkins-test-harness#54 , which breaks compatibility of JTH by removing TestPluginManager#installResourcePlugin . OTOH I do not see any usages of this method.
This PR looks good, but we need to agree what Binary compat requirements do we declare for JTH
@@ -952,6 +952,7 @@ public synchronized void resolveDependantPlugins() { | |||
* with a reasonable up-to-date check. A convenience method to be used by the {@link #loadBundledPlugins()}. | |||
*/ | |||
protected void copyBundledPlugin(URL src, String fileName) throws IOException { | |||
LOGGER.log(FINE, "Copying {0}", src); |
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.
I still have not created a PR with logging improvements :(
It was used only in the code I am deleting here.
We make no guarantees about binary compatibility of test utilities. |
The test failures are still INFRA-1141. |
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.
Not fully convinced about test utilities, but I agree it is not mentioned anywhere. Hence 🐝
@reviewbybees done |
Will merge it after the weekly release |
Why after? There is no testing that will happen in the next week that did not happen in the previous week. Just wondering about the hesitation over merging a test-only PR. |
Just because we already had issues with parallel PR collisions. I didn't want to merge it closely to the weekly. Merging now |
Picking up jenkinsci#2829 to see if that makes a difference in tests.
Downstream of jenkinsci/jenkins-test-harness#54.
Description
While running some core functional tests in an environment with extremely slow filesystem access (Windows over VirtualBox; some driver problem I suppose), I noticed that each test case seemed to spend several minutes during initialization in
createClassJarFromWebInfClasses
, especially insubversion.jpi
, but also in several other smaller plugins.Now
classes.jar
is generated at build time for any plugin built in the past four years or so, but to allow Remoting to cache JARs for really old plugin binaries, we do this step at runtime if necessary. I added a warning when that was necessary.But why was every functional test loading
subversion-1.54.jpi
and the like, anyway? These are detached plugins as of Jenkins 2, not normally used except when needed during upgrades. It turns out the test harness, unlike the real plugin manager, was loading all detached plugins. This just seems like a waste of CPU & I/O.Changelog entries
None required.
Desired reviewers
@reviewbybees, @jenkinsci/code-reviewers