Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[FIXED JENKINS-37041] Ensure that detached plugins are always at least their minimum version #2489
Conversation
…t their minimum version
reviewbybees
commented
Jul 28, 2016
|
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. |
| * @return the minimum required version for the current version of Jenkins. | ||
| * @sice 2.16 | ||
| */ | ||
| public VersionNumber getRequireVersion() { |
This comment has been minimized.
This comment has been minimized.
jglick
Jul 28, 2016
•
Member
getRequiredVersion (and rename field & constructor parameter to match)
|
Isn't this usually something that usually shows up in the detached plugin admin monitor? Not opposed, just wondering how they relate. |
| final Set<ClassicPluginStrategy.DetachedPlugin> forceUpgrade = new HashSet<>(); | ||
| for (ClassicPluginStrategy.DetachedPlugin p : ClassicPluginStrategy.getDetachedPlugins()) { | ||
| VersionNumber installedVersion = getPluginVersion(rootDir, p.getShortName()); | ||
| VersionNumber requireVersion = p.getRequireVersion(); |
This comment has been minimized.
This comment has been minimized.
|
Argh
|
|
|
|
@daniel-beck so I believe the scenario that I have fixed addresses the root issue that @oleg-nenashev was trying to fix in #2436 (though that particular PR seems overly heavyweight and complex to fix this problem) In the specific case of 2.16... you will be in a world of pain if bouncycastle does not load and hence you may not (depending on the other plugins you have installed) be even able to see the admin monitor... given that we have the plugin in the detached list and can therefore fix things for the user before unpacking the plugin archives, seems only prudent to fix things for them |
|
|
|
re |
|
@reviewbybees done |
|
I'm going to wait for the tests... @jenkinsci/code-reviewers as I view this fix as critical, anyone who wants to object has until the tests pass before I hit merge |
|
@jenkinsci/code-reviewers if you want extra time to review, just say so and I will wait... but if I see the tests have passed and nobody else has either objected or asked for more time to review, then I will hit merge ;-) |
reviewbybees
commented
Jul 28, 2016
|
This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging. |
|
Ok tests passed |
|
5 hours timeout is definitely not enough for @jenkinsci/code-reviewers :sadpanda: |
|
The code looks good to me, but I'm not so happy about merging such highly-important changes without any tests |
|
This may have caused JENKINS-37332. |
stephenc commentedJul 28, 2016
See JENKINS-37041
Ok, so here was the test scenario:
With this fix, under my (slightly contrived) test scenario I now get
So this fixed the only code path that I could find that remained whereby a plugin that has been detached would not get upgraded (namely if the admin mistakenly overwrites the detached plugin with an older version than the stated minimum version)
CRITICAL IMHO that this lands in 2.16
@reviewbybees @jenkinsci/code-reviewers