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

Ability to open the console at a certain line, identified by a timestamp

    XMLWordPrintable

Details

    Description

      For example:
      http://localhost:8080/job/frog/11/console?elapsed=01:21

      ...could open the console at the line that was logged 1 hour 21 minutes after the build started.

      It is already possible to add anchor names into the time-stamp format, but this has several drawbacks:

      • There is no way to differentiate between multiple lines with the same time-stamp.
      • When opening the link, the breadcrumb bar appears on top of the target line.
      • Not all lines are displayed at the /console URL, and so some anchor links have no effect unless using the /consoleFull URL.

      Perhaps an offset could be used to distinguish between multiple lines with the same time-stamp, e.g.
      http://localhost:8080/job/frog/11/console?elapsed=01:21
      http://localhost:8080/job/frog/11/console?elapsed=01:21+1
      http://localhost:8080/job/frog/11/console?elapsed=01:21+2

      Raised in response to JENKINS-21171.

      Attachments

        Issue Links

          Activity

            danielbeck Daniel Beck added a comment -

            without having to modify job configs (xml or pipeline) in order to enable them.

            https://jenkins.io/doc/book/pipeline/shared-libraries/

            danielbeck Daniel Beck added a comment - without having to modify job configs (xml or pipeline) in order to enable them. https://jenkins.io/doc/book/pipeline/shared-libraries/
            ssbarnea Sorin Sbarnea added a comment -

            danielbeck Yep, for pipelines we may have some workarounds but for freestyle jobs I don't see one, yet.

            ssbarnea Sorin Sbarnea added a comment - danielbeck Yep, for pipelines we may have some workarounds but for freestyle jobs I don't see one, yet.

            ssbarnea, I agree with you that using the line numbers is better. Couldn't the critical issues with the line numbers plugin be fixed?

            stevengbrown Steven G Brown added a comment - ssbarnea , I agree with you that using the line numbers is better. Couldn't the critical issues with the line numbers plugin be fixed?
            ssbarnea Sorin Sbarnea added a comment - - edited

            stevengbrown In fact I would vote for adding this functionality to this plugin. There are other concerns that do make me believe that we can provide a better UX if these two functionalities would be under the same plugin.

            They both add a prefix and we don't want two prefixes (both line number and timestamps) as this would cut from the horizontal real estate which is already an issue (imagine that I use a 13" monitor).

            So, I would consider this possible use cases:

            • System time, with checkbox for browser timezone
            • Elapsed time
            • *Line numbers (new feature)*
            • None

            Please note that I do see the anchoring/bookmarking as an assumed feature that is enabled for all options but None. In fact is very easy to implement this feature because all you have to do is to add:

            <a href=#L123>{current_annotation_prefix}</a>
            

            When a use wants to share a link, they only have to hover over the timestamp area, right click and copy link. Have a look at "competition" https://travis-ci.org/pycontribs/jira/jobs/194455319#L144

            ssbarnea Sorin Sbarnea added a comment - - edited stevengbrown In fact I would vote for adding this functionality to this plugin. There are other concerns that do make me believe that we can provide a better UX if these two functionalities would be under the same plugin. They both add a prefix and we don't want two prefixes (both line number and timestamps) as this would cut from the horizontal real estate which is already an issue (imagine that I use a 13" monitor). So, I would consider this possible use cases: System time, with checkbox for browser timezone Elapsed time * Line numbers (new feature) * None Please note that I do see the anchoring/bookmarking as an assumed feature that is enabled for all options but None. In fact is very easy to implement this feature because all you have to do is to add: <a href=#L123>{current_annotation_prefix}</a> When a use wants to share a link, they only have to hover over the timestamp area, right click and copy link. Have a look at "competition" https://travis-ci.org/pycontribs/jira/jobs/194455319#L144

            The Line Numbers Plugin provides a URL for each line in the console output, and the issues I raised for that plugin have now been fixed. Using line numbers in the URL is more straightforward than using timestamps and still provides the ability to jump to a line. Closing issue.

            s0undt3ch, please re-open if you would still like the ability to link based on a timestamp

            ssbarnea, please feel free to open a new issue about screen real estate

            stevengbrown Steven G Brown added a comment - The Line Numbers Plugin provides a URL for each line in the console output, and the issues I raised for that plugin have now been fixed. Using line numbers in the URL is more straightforward than using timestamps and still provides the ability to jump to a line. Closing issue. s0undt3ch , please re-open if you would still like the ability to link based on a timestamp ssbarnea , please feel free to open a new issue about screen real estate

            People

              stevengbrown Steven G Brown
              stevengbrown Steven G Brown
              Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: