-
Notifications
You must be signed in to change notification settings - Fork 89
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
resolve-test-dependencies
should not add deps unrelated to the model by default
#373
Conversation
🤷♂️ I did this to test how plugins interact with each other. Some plugins have global effects (e.g., enabling timestamps for all Pipeline builds in Timestamper, a global option to add build user variables to the environment for all builds in Build User Vars, changing the scheduler in Least Load, etc). While in most cases these global changes are opt-in (e.g., the Timestamper and Build User Vars examples) in some cases they are not (e.g., the Least Load example). I deemed it useful to test the interaction between plugins when an unrelated plugin happens to be installed. |
I see. That is something we opt into for |
resolve-test-dependencies
should not add dependencies unrelated to the modelresolve-test-dependencies
should not add dependencies unrelated to the model unless requested
resolve-test-dependencies
should not add dependencies unrelated to the model unless requestedresolve-test-dependencies
should not add dependencies unrelated to the model by default
resolve-test-dependencies
should not add dependencies unrelated to the model by defaultresolve-test-dependencies
should not add deps unrelated to the model by default
…vlet:servlet-api` (via `-mavenPropertiesFile`)
…into resolve-test-dependencies
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.
Should this not be done unconditionally? Why would anyone want to set overrideWarAdditions
to true if the stated objective (testing how plugins interact with each other) is accomplished by setting jth.jenkins-war.path
?
If the BOM use case is covered by |
If there are any benefits to setting both |
I filed #375 and #376 with some alternatives. My main objection to this PR is that it is overly conservative, leaving in some implementation logic that isn't used anywhere but in #375 is a bit riskier but has the simplest possible semantics. I think #376 finds a sweet spot between low risk and simplification. |
I do not know if there are any such benefits; you would be better placed to answer this question (if I understand the history correctly) since you added that clause in #336 despite testing only in the context of
In the CloudBees case, because our interest is in checking whether newer versions of core and plugins already in the declared test classpath turn up regressions. Additionally checking whether the presence of extra plugins in a test classpath will cause test failures might be interesting, but is far less of a priority: most such failures will be artificial (an assertion that needs to be relaxed, as above), with a few cases highlighting an actual mistake in production code. At any rate, we cannot pass |
Yeah I think I was just being overly ambitious and I would rather delete this clause and not even have an option for it for simplicity. I can test out a simple deletion if that would save you some time.
Ah that's too bad. Well in that case my proposed simplification PRs are not feasible then. |
Sure, that would be helpful. |
Done in this run. Even setting aside the So hm… using So I am left with the conclusion that adding these "long tail" plugins to the model in test scope is at least somewhat desirable, in a narrow sense. So I think I definitely want to keep this code around in the short term. The question for me is why you want to disable it: you started this conversation with a request for me to justify the inclusion of the code, which I believe I have now done, so now I make the same request in return: what would be your reason for wanting to disable it? Is it that putting everything all plugins into a flat classpath for non- |
Whatever https://github.com/jenkinsci/job-dsl-plugin/blob/94d5aa82764ef808ab36c5e8ee0dd5404ef65844/job-dsl-plugin/build.gradle#L119 does, it seems to not work in https://github.com/jenkinsci/job-dsl-plugin/blob/94d5aa82764ef808ab36c5e8ee0dd5404ef65844/job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/JenkinsDslScriptLoader.java#L24-L25 in a
Fine with me, so long as it is optional, as in this PR.
Lots of tests fail with this clause applied to a CloudBees WAR file. (And fail slowly—the test run is much longer than it should be.) A bunch of stuff is loaded which was never intended to be used in a |
That is what I suspect. Have not looked into it closely yet.
I guess? I could see arguments both ways here. On the one hand, an argument could be made that my approach of adding things to the model takes the "flat" classpath design of
Thanks, I will try that out and keep trying to remove this logic in
Thanks for the context but I am still not clear on the reason why these CloudBees tests are failing. But no matter: not including the "long tail" in the Surefire flat classpath is closer to the way |
src/main/java/org/jenkinsci/maven/plugins/hpi/TestDependencyMojo.java
Outdated
Show resolved
Hide resolved
I will release this momentarily. |
In some sense, yes. I am not sure we care. |
Got this scary warning when releasing:
I guess if we have any problems, we'll have to roll back Maven Deploy Plugin to 2.x? |
Perhaps. https://issues.apache.org/jira/browse/MNG-7055 does not sound comforting. |
I do not quite understand the antecedent of "this" in "This plugin should be used ONLY with Maven 3.9.0 and newer": is it referring to the plugin being deployed (i.e., |
I presumed it referred to the plugin doing the deploying. I think when |
If it ain't broke? On the other hand, if something does break, we'll have a better understanding of what this is all about… |
Trying to figure out what #336 (comment) really meant.
(
overrideWar
does not appear to have any IT coverage, so this is just a placeholder to be tested in the context ofbom
.)