Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36696

Naginator plugin not really optional as it spews out a stacktrace when not installed

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • build-timeout-plugin
    • None
    • Jenkins 2.7

      If you install build timeout but not naginator, everytime you launch jenkins you see the stack trace below.

      This seems not a great way to treat an "optional" dependency. It should be non optional if it is going to do this, or some other approach needs to be used instead of just failing hard to load a component.

      WARNING: Failed to instantiate Key[type=hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Guice provision errors:
      
      1) Error injecting constructor, java.lang.NoClassDefFoundError: com/chikli/hudson/plugin/naginator/ScheduleDelay
        at hudson.plugins.build_timeout.operations.AbortAndRestartOperation$DescriptorImpl.<init>(AbortAndRestartOperation.java:120)
      
      1 error
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
      	at com.google.inject.Scopes$1$1.get(Scopes.java:65)
      	at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:424)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      	at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:1005)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1051)
      	at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:1001)
      	at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:386)
      	at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
      	at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:470)
      	at hudson.ExtensionList.load(ExtensionList.java:349)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:287)
      	at hudson.ExtensionList.getComponents(ExtensionList.java:167)
      	at hudson.DescriptorExtensionList.load(DescriptorExtensionList.java:185)
      	at hudson.ExtensionList.ensureLoaded(ExtensionList.java:287)
      	at hudson.ExtensionList.iterator(ExtensionList.java:156)
      	at hudson.ExtensionList.get(ExtensionList.java:147)
      	at com.cloudbees.jenkins.GitHubPushTrigger$DescriptorImpl.get(GitHubPushTrigger.java:320)
      	at org.jenkinsci.plugins.github.migration.Migrator.migrate(Migrator.java:41)
      	at org.jenkinsci.plugins.github.GitHubPlugin.postInitialize(GitHubPlugin.java:39)
      	at hudson.PluginManager$2$1$2.run(PluginManager.java:434)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:996)
      

          [JENKINS-36696] Naginator plugin not really optional as it spews out a stacktrace when not installed

          Michael Neale created issue -
          ikedam made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: ikedam [ ikedam ]
          ikedam made changes -
          Priority Original: Major [ 3 ] New: Critical [ 2 ]
          ikedam made changes -
          Priority Original: Critical [ 2 ] New: Major [ 3 ]
          ikedam made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Michael Neale made changes -
          Attachment New: Screen Shot 2016-07-19 at 2.35.23 PM.png [ 33370 ]
          Michael Neale made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Michael Neale made changes -
          Comment [ [~dbeckham] [~ikedam]

          I am not sure if this is good.
          When running the installer of jenkins now, it disables that extension, but then the installer stalls as it never sees the build timeout "recommended" plugin completed:

          {noformat}
          SEVERE: Failed to enable build timeout plugin
          java.io.IOException: Failed to delete /Users/michaelneale/projects/paas/blueocean-plugin/blueocean-plugin/work/plugins/build-timeout.jpi.disabled
          at hudson.PluginWrapper.enable(PluginWrapper.java:444)
          at hudson.model.UpdateCenter$EnableJob.run(UpdateCenter.java:1424)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110)
          at java.lang.Thread.run(Thread.java:745)
          {noformat}

           !Screen Shot 2016-07-19 at 2.35.23 PM.png|thumbnail!

          I suggest undoing this change, until the installer can cope with plugins that fail with optional extensions. As it is, this is broken for everyone right now. ]
          Michael Neale made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 173423 ] New: JNJira + In-Review [ 199453 ]

            ikedam ikedam
            michaelneale Michael Neale
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: