If a stage step is run, this should produce a visually distinctive line in console output, ideally with a block structure.

          [JENKINS-27394] Render stages in logs as collapsible sections

          Jesse Glick added a comment -

          For scripts not using parallel you can use the Collapsing Console Sections plugin with

          Section name: {1}
          Section starts with: ^\[Pipeline\] \{ \((.+)\)
          Section ends with: ^\[Pipeline\] \}
          One-per-line ending: true
          

          to render blocky stage and more. But we should bake this into workflow-job and properly support parallel, so that you can temporarily hide a whole branch from view (even when output is interleaved).

          Jesse Glick added a comment - For scripts not using parallel you can use the Collapsing Console Sections plugin with Section name: {1} Section starts with: ^\[Pipeline\] \{ \((.+)\) Section ends with: ^\[Pipeline\] \} One-per-line ending: true to render blocky stage and more. But we should bake this into workflow-job and properly support parallel , so that you can temporarily hide a whole branch from view (even when output is interleaved).

          Michael Neale added a comment - - edited

          There have been other console annotator plugins that have done something similar (but generically based on regex) right?

          Michael Neale added a comment - - edited There have been other console annotator plugins that have done something similar (but generically based on regex) right?

          James Dumay added a comment -

          jglick won't this have to be filtered out of the Blue Ocean log viewer?

          James Dumay added a comment - jglick won't this have to be filtered out of the Blue Ocean log viewer?

          Patrick Wolf added a comment -

          jamesdumay jglick Let's discuss this. I think it would be best to rely on Blue Ocean for viewing logs specific to a Stage. However, for external tools that rely on raw build logs (splunk, etc) it would be helpful to have the stages present. The last thing we need is competing visualizations within Jenkins itself.

          Patrick Wolf added a comment - jamesdumay jglick Let's discuss this. I think it would be best to rely on Blue Ocean for viewing logs specific to a Stage. However, for external tools that rely on raw build logs (splunk, etc) it would be helpful to have the stages present. The last thing we need is competing visualizations within Jenkins itself.

          Jesse Glick added a comment -

          There have been other console annotator plugins that have done something similar (but generically based on regex) right?

          Yes see my comment immediately prior to yours.

          won't this have to be filtered out of the Blue Ocean log viewer?

          I doubt it. Are you even interpreting console annotations of any kind today?

          For the build log aspect of JENKINS-30896, and Jenkins 3 generally, the current storage of step logs needs to be rewritten, so the current implementation here can be considered a throwaway. Anyway, it is cheap enough, and helps when using the textual log.

          Jesse Glick added a comment - There have been other console annotator plugins that have done something similar (but generically based on regex) right? Yes see my comment immediately prior to yours. won't this have to be filtered out of the Blue Ocean log viewer? I doubt it. Are you even interpreting console annotations of any kind today? For the build log aspect of JENKINS-30896 , and Jenkins 3 generally, the current storage of step logs needs to be rewritten, so the current implementation here can be considered a throwaway. Anyway, it is cheap enough, and helps when using the textual log.

          James Dumay added a comment -

          jglick AFAIK we ignore the annotator - is that still true vivek?

          James Dumay added a comment - jglick AFAIK we ignore the annotator - is that still true vivek ?

          James Dumay added a comment - - edited

          Right - in that case it does seem good for raw log

          James Dumay added a comment - - edited Right - in that case it does seem good for raw log

          James Dumay added a comment -

          Though do test with Blue Ocean if you can

          James Dumay added a comment - Though do test with Blue Ocean if you can

          Vivek Pandey added a comment -

          jamesdumay yes ui fetched plain logs and that way it ignores the annotated logs but the annotated logs are available via API. So UI can fetch annotated logs if it wants to.

          Vivek Pandey added a comment - jamesdumay yes ui fetched plain logs and that way it ignores the annotated logs but the annotated logs are available via API. So UI can fetch annotated logs if it wants to.

          Jesse Glick added a comment -

          Handled in JEP-210 for classic UI console.

          Jesse Glick added a comment - Handled in JEP-210 for classic UI console.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            25 Vote for this issue
            Watchers:
            33 Start watching this issue

              Created:
              Updated:
              Resolved: