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

consoleText stops updating at 5000 lines until end of build job

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I found that the consoleText stops updating once a build command's output reaches 5000 lines. It doesn't update until the end of the build job, and then the rest of the lines are updated in consoleText. The consoleFull continues to update as expected, beyond the 5000 lines, even as the consoleText is not being updated.

      I have a client process which monitors the output of consoleText for changes on a build job. It stops updating at 5000 lines, then when the job completes, the rest of the build output can be found in consoleText. This gives the appearance of a stalled build job.

        Attachments

          Issue Links

            Activity

            davidlbaird David Baird created issue -
            davidlbaird David Baird made changes -
            Field Original Value New Value
            Assignee Alan Harder [ mindless ]
            mindless Alan Harder made changes -
            Assignee Alan Harder [ mindless ]
            Hide
            davidlbaird David Baird added a comment -

            According to http://stackoverflow.com/questions/13388217/jenkins-plain-text-console-output-not-in-real-time: "That is because output is truncated by default around 5k lines, so the full text will always pull the last 5k while the build is in progress, similar to the way the HTML view will only show about 5k lines until you click the "Show Full Output" button.

            Once the build completes, the full output gets dumped to plain text, so the entire output is shown"

            Please add a feature to pull the last 5k, not always show the first 5k.

            Show
            davidlbaird David Baird added a comment - According to http://stackoverflow.com/questions/13388217/jenkins-plain-text-console-output-not-in-real-time: "That is because output is truncated by default around 5k lines, so the full text will always pull the last 5k while the build is in progress, similar to the way the HTML view will only show about 5k lines until you click the "Show Full Output" button. Once the build completes, the full output gets dumped to plain text, so the entire output is shown" Please add a feature to pull the last 5k, not always show the first 5k.
            Hide
            bnied Ben Nied added a comment -

            Is there currently any way around this limit that doesn't require scraping the HTML view?

            Show
            bnied Ben Nied added a comment - Is there currently any way around this limit that doesn't require scraping the HTML view?
            Show
            danielbeck Daniel Beck added a comment - Source of this issue: https://github.com/stapler/stapler/blob/master/core/src/main/java/org/kohsuke/stapler/framework/io/LargeText.java#L547
            danielbeck Daniel Beck made changes -
            Assignee Daniel Beck [ danielbeck ]
            danielbeck Daniel Beck made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            danielbeck Daniel Beck made changes -
            Remote Link This issue links to "PR 1733 (Web Link)" [ 12935 ]
            Hide
            davidlbaird David Baird added a comment - - edited

            My current solution in Python is something like...
            {{
            while True:
            try:
            page = readpage(text_url, data='start=%s' % text_offset)
            except:
            sys.stderr.write('\nStopping build')
            readpage(build_url + '/stop')
            raise
            time.sleep(0.1)
            if page['error'] in _HTTP_ERROR_IGNORE_LIST:
            continue
            if page['text']:
            sys.stdout.write(page['text'])
            text_offset = page['header'].get('x-text-size')
            if text_offset and 'true' != page['header'].get('x-more-data'):
            break
            }}

            Show
            davidlbaird David Baird added a comment - - edited My current solution in Python is something like... {{ while True: try: page = readpage(text_url, data='start=%s' % text_offset) except: sys.stderr.write('\nStopping build') readpage(build_url + '/stop') raise time.sleep(0.1) if page ['error'] in _HTTP_ERROR_IGNORE_LIST: continue if page ['text'] : sys.stdout.write(page ['text'] ) text_offset = page ['header'] .get('x-text-size') if text_offset and 'true' != page ['header'] .get('x-more-data'): break }}
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/model/Run.java
            http://jenkins-ci.org/commit/jenkins/20bd4e304976dc64fa6abc165823425ba524ccb2
            Log:
            [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/Run.java http://jenkins-ci.org/commit/jenkins/20bd4e304976dc64fa6abc165823425ba524ccb2 Log: [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/model/Run.java
            http://jenkins-ci.org/commit/jenkins/ad7cba99d7eef6e2849baeed427a452b8ba874bd
            Log:
            Merge pull request #1733 from daniel-beck/JENKINS-14899

            [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText

            Compare: https://github.com/jenkinsci/jenkins/compare/9b7d8e9f8a96...ad7cba99d7ee

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/Run.java http://jenkins-ci.org/commit/jenkins/ad7cba99d7eef6e2849baeed427a452b8ba874bd Log: Merge pull request #1733 from daniel-beck/ JENKINS-14899 [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText Compare: https://github.com/jenkinsci/jenkins/compare/9b7d8e9f8a96...ad7cba99d7ee
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4175

            Result = SUCCESS

            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4175 Result = SUCCESS
            danielbeck Daniel Beck made changes -
            Labels lts-candidate
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Daniel Beck
            Path:
            core/src/main/java/hudson/model/Run.java
            http://jenkins-ci.org/commit/jenkins/c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c
            Log:
            [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText

            (cherry picked from commit 20bd4e304976dc64fa6abc165823425ba524ccb2)

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/Run.java http://jenkins-ci.org/commit/jenkins/c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c Log: [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText (cherry picked from commit 20bd4e304976dc64fa6abc165823425ba524ccb2)
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate 1.609.2-fixed
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #4292
            [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText (Revision c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c)

            Result = UNSTABLE
            ogondza : c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c
            Files :

            • core/src/main/java/hudson/model/Run.java
            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #4292 [FIX JENKINS-14899] Don't use truncating LargeText for /consoleText (Revision c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c) Result = UNSTABLE ogondza : c3dcaeb8d55fe8a8065fb60cecef23d23eb9b87c Files : core/src/main/java/hudson/model/Run.java
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 145600 ] JNJira + In-Review [ 191557 ]

              People

              Assignee:
              danielbeck Daniel Beck
              Reporter:
              davidlbaird David Baird
              Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: