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

Pipeline without init jobs not migrated correctly. Jobs can not be renamed.

      When a pipeline view without init job is migrated from version before ProjectGridBuilder was introduced, readResolve leaves null in gridBuilder.

      When a jobs is renamed NPE is thrown from BuildPipelineView#onJobRenamed.

      [1] https://github.com/jenkinsci/build-pipeline-plugin/blob/dcaca3b63a2f222631ef7ea50ef8c838706feb4b/src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java#L279-285

      java.lang.NullPointerException
      	at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.onJobRenamed(BuildPipelineView.java:808)
      	at hudson.plugins.nested_view.NestedView.onJobRenamed(NestedView.java:163)
      	at hudson.plugins.nested_view.NestedView.onJobRenamed(NestedView.java:163)
      	at jenkins.model.Jenkins.onRenamed(Jenkins.java:2441)
      	at jenkins.model.Jenkins.onRenamed(Jenkins.java:311)
      	at hudson.model.AbstractItem.callOnRenamed(AbstractItem.java:307)
      	at hudson.model.AbstractItem.renameTo(AbstractItem.java:293)
      	at hudson.model.Job.renameTo(Job.java:608)
      	at hudson.model.AbstractProject.renameTo(AbstractProject.java:1664)
      	at hudson.model.Job.doDoRename(Job.java:1371)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
      	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:46)
      	at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:399)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
      	... 62 more
      

          [JENKINS-24220] Pipeline without init jobs not migrated correctly. Jobs can not be renamed.

          Oliver Gondža created issue -
          Oliver Gondža made changes -
          Description Original: When a pipeline view without init job is migrated from version before {{ProjectGridBuilder}} was introduced, {{readResolve}} leaves null in gridBuilder.

          When a jobs is renamed NPE is thrown from {{BuildPipelineView#onJobRenamed}}.

          [1] https://github.com/jenkinsci/build-pipeline-plugin/blob/dcaca3b63a2f222631ef7ea50ef8c838706feb4b/src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java#L279-285

          {noformat}
          java.lang.NullPointerException

                  at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.onJobRenamed(BuildPipelineView.java:808)

                  at hudson.plugins.nested_view.NestedView.onJobRenamed(NestedView.java:163)

                  at hudson.plugins.nested_view.NestedView.onJobRenamed(NestedView.java:163)

                  at jenkins.model.Jenkins.onRenamed(Jenkins.java:2441)

                  at jenkins.model.Jenkins.onRenamed(Jenkins.java:311)

                  at hudson.model.AbstractItem.callOnRenamed(AbstractItem.java:307)

                  at hudson.model.AbstractItem.renameTo(AbstractItem.java:293)

                  at hudson.model.Job.renameTo(Job.java:608)

                  at hudson.model.AbstractProject.renameTo(AbstractProject.java:1664)

                  at hudson.model.Job.doDoRename(Job.java:1371)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                  at java.lang.reflect.Method.invoke(Method.java:597)

                  at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)

                  at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:46)

                  at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:399)

                  at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)

                  at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)

                  at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)

                  at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)

                  at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)

                  ... 62 more
          {noformat}
          New: When a pipeline view without init job is migrated from version before {{ProjectGridBuilder}} was introduced, {{readResolve}} leaves null in gridBuilder.

          When a jobs is renamed NPE is thrown from {{BuildPipelineView#onJobRenamed}}.

          [1] https://github.com/jenkinsci/build-pipeline-plugin/blob/dcaca3b63a2f222631ef7ea50ef8c838706feb4b/src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildPipelineView.java#L279-285

          {noformat}
          java.lang.NullPointerException
          at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildPipelineView.onJobRenamed(BuildPipelineView.java:808)
          at hudson.plugins.nested_view.NestedView.onJobRenamed(NestedView.java:163)
          at hudson.plugins.nested_view.NestedView.onJobRenamed(NestedView.java:163)
          at jenkins.model.Jenkins.onRenamed(Jenkins.java:2441)
          at jenkins.model.Jenkins.onRenamed(Jenkins.java:311)
          at hudson.model.AbstractItem.callOnRenamed(AbstractItem.java:307)
          at hudson.model.AbstractItem.renameTo(AbstractItem.java:293)
          at hudson.model.Job.renameTo(Job.java:608)
          at hudson.model.AbstractProject.renameTo(AbstractProject.java:1664)
          at hudson.model.Job.doDoRename(Job.java:1371)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
          at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:46)
          at org.kohsuke.stapler.Function$InterceptedFunction.invoke(Function.java:399)
          at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
          at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
          at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)
          at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
          at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)
          ... 62 more
          {noformat}
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 157100 ] New: JNJira + In-Review [ 179509 ]

            Unassigned Unassigned
            olivergondza Oliver Gondža
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: