Details

    • Similar Issues:

      Description

      When a flow involves many steps, long logs, and/or many branches, it can be hard for a developer receiving a failure email (for example) to quickly see what part of the build actually failed and why. I think it would be useful for the catchError step to do a DFS search on the Throwable and its cause chain through the FlowNode graph starting at the end of the catch step, looking for ErrorAction, and setting/appending an environment variable with the URL of the LogAction. Or provide a new step to do the same. Thus you could write

      def runStuff(param) {
        ...
      }
      try {
        parallel a: {runStuff 'a'}, b: {runStuff 'b'}
      } catch (e) {
        mail to: '...', subject: 'Failure!', body: "Build failed: ${errorUrl(e)}"
      }
      

      and get a link to http://jenkins/job/myflow/123/flowGraph/77/console or the like, according to the actual step in one of the branches that threw the error.

        Attachments

          Issue Links

            Activity

            Hide
            ringerc Craig Ringer added a comment -

            This becomes even more relevant when working with Blue Ocean etc. The URLs are something like `jobname/6/pipeline/79` where the /79 is a node in the graph of steps and parallel tasks. It doesn't seem to be predictable, so it's not clear how you can generate a URL that points to exactly one parallel step, for example.

            Show
            ringerc Craig Ringer added a comment - This becomes even more relevant when working with Blue Ocean etc. The URLs are something like `jobname/6/pipeline/79` where the /79 is a node in the graph of steps and parallel tasks. It doesn't seem to be predictable, so it's not clear how you can generate a URL that points to exactly one parallel step, for example.
            Hide
            hardi249 Michael Hartmann added a comment -

            Is this still in progress?

            Show
            hardi249 Michael Hartmann added a comment - Is this still in progress?
            Hide
            jglick Jesse Glick added a comment -

            Not really. I suppose I could revisit this, given the high vote count.

            Show
            jglick Jesse Glick added a comment - Not really. I suppose I could revisit this, given the high vote count.
            Hide
            monger39 David Riemens added a comment -

            just up-voted;
            Me too, I have similar usecase. In our testenvironment, we run many tools, each generating a separate logfile. We have one generic log shown in the console.
            If one test fails, we can see that it failed, and typically have an exception message shown in the console, but the actual (detailed) reason is hidden in one of
            theĀ  detailed logs. For that reason we want to include a link to the workspace directory on the exception text, such that all the log-files are just one click away.
            For the pipeline jobs that link is not easy to derive; it is hidden in one of the pipeline steps. as also indicated by Craig Ringer
            My feeling says that making sure that link, or the ID is available at runtime should be possible ... right ?

            Show
            monger39 David Riemens added a comment - just up-voted; Me too, I have similar usecase. In our testenvironment, we run many tools, each generating a separate logfile. We have one generic log shown in the console. If one test fails, we can see that it failed, and typically have an exception message shown in the console, but the actual (detailed) reason is hidden in one of theĀ  detailed logs. For that reason we want to include a link to the workspace directory on the exception text, such that all the log-files are just one click away. For the pipeline jobs that link is not easy to derive; it is hidden in one of the pipeline steps. as also indicated by Craig Ringer My feeling says that making sure that link, or the ID is available at runtime should be possible ... right ?
            Hide
            heyleke Jan Heylen added a comment - - edited

            Is there already any way to get the link to 'blue/rest/organizations/jenkins/pipelines/<jobname>/runs/<build-id>/nodes/<PipelineNodeImpl-id>/log/ from within a pipeline parallel node?

            Show
            heyleke Jan Heylen added a comment - - edited Is there already any way to get the link to 'blue/rest/organizations/jenkins/pipelines/<jobname>/runs/<build-id>/nodes/<PipelineNodeImpl-id>/log/ from within a pipeline parallel node?

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                41 Vote for this issue
                Watchers:
                56 Start watching this issue

                Dates

                • Created:
                  Updated: