timja / jenkins-gh-issues-poc-06-18

0 stars 0 forks source link

[JENKINS-34209] Pipeline plugin installs in upgrade wizard throws exceptions #3032

Open timja opened 8 years ago

timja commented 8 years ago

Reported on IRC:

[2016-04-13 07:14:46]       rc1 update failed updating Multibranch
[2016-04-13 07:14:47]    Pipeline: Multibranch    
[2016-04-13 07:14:47]    Failure -
[2016-04-13 07:14:47]    java.lang.NoClassDefFoundError: jenkins/scm/api/SCMNavigatorDescriptor
[2016-04-13 07:14:47]        at jenkins.branch.CustomOrganizationFolderDescriptor.doAddSpecificDesc
[2016-04-13 07:15:47]    it seems to have actually installed fine though, looks normal after restart
[2016-04-13 11:08:40]  <@danielbeck>     benh57_ Still around? If so, could you please explain what exactly was updated, and where you see the error message?
[2016-04-13 20:54:23]       danielbeck: that error message was on the initial plugin upgrade screen that appears when updating to 2.0rc1.
[2016-04-13 20:55:05]  <@danielbeck>     benh57_ To clarify, are you upgrading or installing new?
[2016-04-13 20:55:35]       upgrading from 1.6something
[2016-04-13 20:55:47]       i clicked the 'click here to finish updating!' screen
[2016-04-13 20:56:07]       however, after jenkins restarted, the plugin appears to have updated fine
[2016-04-13 20:56:31]       i can check the log for the exact full details and email that to you
[2016-04-13 20:59:29]       there are various SCM-related exceptions in there actually
[2016-04-13 20:59:51]       1) Error injecting constructor, java.lang.NoClassDefFoundError: jenkins/scm/api/SCMSourceObserver
[2016-04-13 20:59:51]         at jenkins.branch.OrganizationFolder$DescriptorImpl.(OrganizationFolder.java:266)
[2016-04-13 21:00:11]       Apr 13, 2016 5:13:52 AM hudson.ExtensionFinder$GuiceFinder$SezpozModule configure
[2016-04-13 21:00:11]       WARNING: Failed to load jenkins.branch.BranchProjectFactory$HeadByItemImpl
[2016-04-13 21:00:11]       java.lang.InstantiationException: java.lang.NoClassDefFoundError: jenkins/scm/api/SCMHead$HeadByItem

My guess: The old dependency system (JENKINS-21486 ) does not take into account that dependencies may exist but be outdated when trying to dynamically load a plugin.

In the case of an outdated SCM API plugin (judging from these messages), this results in exceptions upon Pipeline plugin installation.


Originally reported by danielbeck, imported from: Pipeline plugin installs in upgrade wizard throws exceptions
  • status: Open
  • priority: Minor
  • resolution: Unresolved
  • imported: 2022/01/10
timja commented 8 years ago

danielbeck:

FYI kohsuke.

rtyler Something to investigate tomorrow, perhaps? Not trivial to reproduce, likely requires specifically installing an older version of the SCM API plugin.

timja commented 8 years ago

rtyler:

I'll try to nail down some reproduction steps

timja commented 8 years ago

danielbeck:

Mercurial Plugin still depends on SCM API 0.1. These extension points were added in 0.3. So it should be possible setting up a Jenkins 1.651.1 install with Mercurial Plugin, manually downgrade SCM API to 0.2, restart, everything works, upgrade to 2.0 RC, install Pipelines, expect it to explode.

timja commented 8 years ago

danielbeck:

Reproducible by installing the latest weekly, then installing 2.0 RC on top of it, then installing these plugins. Will show a similar error for Credentials Plugin.

As Jenkins is showing the update center install progress screen, and tells people to restart, I don't think this is particularly critical. It's certainly not nice, but we're working on this behavior in the context of JENKINS-21486, JENKINS-34073 (which barely got pulled out of 2.0 due to risk of perceived regressions).