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

Open Blue Ocean button should not try to load /activity for a folder

    XMLWordPrintable

Details

    • frank, tethys

    Description

      If you browse to a folder, such as an org folder like:

      https://ci.jenkins.io/job/Infra/ and click "open blue ocean"

      it will open a nonsensical URI which will attempt to load activity for the folder (which is not yet supported).

      Expected behavior:

      The underlying problem is that activities blows up (but it really shoudl be 404):
      https://ci.jenkins.io/blue/rest/organizations/jenkins/pipelines/Infra/activities/?start=0&limit=26

      javax.servlet.ServletException: java.lang.NullPointerException
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:686)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
      	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:206)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      	at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:499)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      	at io.jenkins.blueocean.rest.model.BluePipeline.getActivities(BluePipeline.java:130)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
      	at org.kohsuke.stapler.MetaClass$3.doDispatch(MetaClass.java:196)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      	... 81 more
      

      Attachments

        Issue Links

          Activity

            tfennelly Tom FENNELLY added a comment -

            PRs:

            Doesn't contain fixes for the other issues listed. They are separate issues. Why are they dropped in here? Any objections to creating discreet issues for the different problems?

            tfennelly Tom FENNELLY added a comment - PRs: https://github.com/jenkinsci/blueocean-plugin/pull/685 https://github.com/jenkinsci/blueocean-acceptance-test/pull/96/files Doesn't contain fixes for the other issues listed. They are separate issues. Why are they dropped in here? Any objections to creating discreet issues for the different problems?

            Code changed in jenkins
            User: tfennelly
            Path:
            src/test/js/edgeCases/folder.js
            src/test/js/multibranch/folder.js
            http://jenkins-ci.org/commit/blueocean-acceptance-test/a5a3fd7171edc614fbba387fd5b0af5ea78faae3
            Log:
            Another test for JENKINS-39842 for @kzantow

            Using folder and job/branch names that are not confusing (special chars etc). BTW I'm leaving the original tests that were using weird chars because I think it's good to have tests that challenge the url encoding etc. Sure that can result in the presence of weird chars, but weird chars are a fact of life, so good to test against them.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: tfennelly Path: src/test/js/edgeCases/folder.js src/test/js/multibranch/folder.js http://jenkins-ci.org/commit/blueocean-acceptance-test/a5a3fd7171edc614fbba387fd5b0af5ea78faae3 Log: Another test for JENKINS-39842 for @kzantow Using folder and job/branch names that are not confusing (special chars etc). BTW I'm leaving the original tests that were using weird chars because I think it's good to have tests that challenge the url encoding etc. Sure that can result in the presence of weird chars, but weird chars are a fact of life, so good to test against them.

            Code changed in jenkins
            User: Tom Fennelly
            Path:
            src/main/js/page_objects/classic_jenkins/classicGeneral.js
            src/test/js/edgeCases/folder.js
            src/test/js/multibranch/folder.js
            http://jenkins-ci.org/commit/blueocean-acceptance-test/1ea16a7e6dc7f9063fb0f96953049e9133c89123
            Log:
            [FIX JENKINS-39842] Open Blue Ocean button should not try to load /activity for a folder (#96)

            Clicking on the "Open Blue Ocean" button while in a classic folder that's not a MBP project folder should bring the user to the main top-level blue ocean page i.e. pipelines

            Using folder and job/branch names that are not confusing (special chars etc). BTW I'm leaving the original tests that were using weird chars because I think it's good to have tests that challenge the url encoding etc. Sure that can result in the presence of weird chars, but weird chars are a fact of life, so good to test against them.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Tom Fennelly Path: src/main/js/page_objects/classic_jenkins/classicGeneral.js src/test/js/edgeCases/folder.js src/test/js/multibranch/folder.js http://jenkins-ci.org/commit/blueocean-acceptance-test/1ea16a7e6dc7f9063fb0f96953049e9133c89123 Log: [FIX JENKINS-39842] Open Blue Ocean button should not try to load /activity for a folder (#96) Test for JENKINS-39842 Clicking on the "Open Blue Ocean" button while in a classic folder that's not a MBP project folder should bring the user to the main top-level blue ocean page i.e. pipelines Another test for JENKINS-39842 for @kzantow Using folder and job/branch names that are not confusing (special chars etc). BTW I'm leaving the original tests that were using weird chars because I think it's good to have tests that challenge the url encoding etc. Sure that can result in the presence of weird chars, but weird chars are a fact of life, so good to test against them.
            tfennelly Tom FENNELLY added a comment -

            Added JENKINS-40917 for the first "additional" issue. I don't think it's likely now, having fixed this issue.

            As for the second "additional" issue, I checked and see a 404 in the browser at least....

            tfennelly Tom FENNELLY added a comment - Added JENKINS-40917 for the first "additional" issue. I don't think it's likely now, having fixed this issue. As for the second "additional" issue, I checked and see a 404 in the browser at least....
            jamesdumay James Dumay added a comment -

            tfennelly feel free to bring that ticket up into the sprint

            jamesdumay James Dumay added a comment - tfennelly feel free to bring that ticket up into the sprint

            People

              tfennelly Tom FENNELLY
              jamesdumay James Dumay
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: