list-jobs CLI command should not list ItemgGroups of any items but TopLevelItems

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Currently, list-jobs command tries to list any ItemGroups (including MavenModuleSet or MatrixProject which does not make sense). It should list instances of View and ItemGroup<? extends TopLevelItem> exclusively.

      jenkins-cli.jar list-jobs MyMatrixJob fails with:

      java.lang.ClassCastException: hudson.matrix.MatrixConfiguration cannot be cast to hudson.model.TopLevelItem
      	at hudson.cli.ListJobsCommand.run(ListJobsCommand.java:88)
      	at hudson.cli.CLICommand.main(CLICommand.java:229)
      	at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92)
      	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 hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:282)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:263)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:222)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63)
      	at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      	at java.lang.Thread.run(Thread.java:662)
      

            Assignee:
            Oliver Gondža
            Reporter:
            Oliver Gondža
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: