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

/progressiveLog broken in Hudson 1.350

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None

      Description

      As of Hudson 1.350, the console log shown for a build in the NetBeans output window displays as one big line:

      Started by an SCM change<br>Building on master<br>....

      This is using the /progressiveLog API (see URL for source).

        Issue Links

          Activity

          Hide
          jglick Jesse Glick added a comment -

          Seems to be a regression caused by fixing HTML display for web client.

          Show
          jglick Jesse Glick added a comment - Seems to be a regression caused by fixing HTML display for web client.
          Hide
          mindless Alan Harder added a comment - - edited

          I traced thru a bit and looks like this is due to running output thru a MarkupText in ConsoleAnnotationOutputStream.eol() even though in this case the response has already been set to text/plain.

          Assigning to kohsuke to determine the right fix here.. maybe no MarkupText, maybe no annotation at all? (adding <a> around a URL in text/plain?)

          Another note: while looking at this I noticed that MarkupText.toString(boolean) has an "if (tags.isEmpty())" check right away.. if this is true, then the "boolean preEscape" parameter is ignored/unused.. should this return statement do the xmlEscape() vs escape() thing that is done below like line 280?

          Show
          mindless Alan Harder added a comment - - edited I traced thru a bit and looks like this is due to running output thru a MarkupText in ConsoleAnnotationOutputStream.eol() even though in this case the response has already been set to text/plain. Assigning to kohsuke to determine the right fix here.. maybe no MarkupText, maybe no annotation at all? (adding <a> around a URL in text/plain?) Another note: while looking at this I noticed that MarkupText.toString(boolean) has an "if (tags.isEmpty())" check right away.. if this is true, then the "boolean preEscape" parameter is ignored/unused.. should this return statement do the xmlEscape() vs escape() thing that is done below like line 280?
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : mindless
          Path:
          trunk/hudson/main/core/src/main/java/hudson/MarkupText.java
          trunk/hudson/main/core/src/test/java/hudson/MarkupTextTest.java
          http://jenkins-ci.org/commit/28737
          Log:
          JENKINS-5941 JENKINS-5944 MarkupText.toString(boolean) was ignoring the
          preEscape parameter when no markup tags were added.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : mindless Path: trunk/hudson/main/core/src/main/java/hudson/MarkupText.java trunk/hudson/main/core/src/test/java/hudson/MarkupTextTest.java http://jenkins-ci.org/commit/28737 Log: JENKINS-5941 JENKINS-5944 MarkupText.toString(boolean) was ignoring the preEscape parameter when no markup tags were added.
          Hide
          mindless Alan Harder added a comment -

          I fixed the MarkupText bug I mentioned above.. leaving the markup/annotations-for-text/plain? issue to Kohsuke.

          Show
          mindless Alan Harder added a comment - I fixed the MarkupText bug I mentioned above.. leaving the markup/annotations-for-text/plain? issue to Kohsuke.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Perhaps for compatibility reasons I should leave progressiveLog as plain text and use a different URL for text/html.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Perhaps for compatibility reasons I should leave progressiveLog as plain text and use a different URL for text/html.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/core/pom.xml
          trunk/hudson/main/core/src/main/java/hudson/console/AnnotatedLargeText.java
          trunk/hudson/main/core/src/main/java/hudson/model/Computer.java
          trunk/hudson/main/core/src/main/java/hudson/model/Run.java
          trunk/hudson/main/core/src/main/java/hudson/model/TaskAction.java
          trunk/hudson/main/core/src/main/java/hudson/triggers/SCMTrigger.java
          trunk/hudson/main/core/src/main/resources/hudson/model/Run/console.jelly
          trunk/hudson/main/core/src/main/resources/hudson/model/TaskAction/log.jelly
          trunk/hudson/main/core/src/main/resources/hudson/slaves/SlaveComputer/log.jelly
          trunk/hudson/main/test/src/test/java/hudson/console/ConsoleAnnotatorTest.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/28764
          Log:
          [FIXED JENKINS-5941] in 1.352. Keep progressiveText for text/plain and serve text/html from a different URL.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/core/pom.xml trunk/hudson/main/core/src/main/java/hudson/console/AnnotatedLargeText.java trunk/hudson/main/core/src/main/java/hudson/model/Computer.java trunk/hudson/main/core/src/main/java/hudson/model/Run.java trunk/hudson/main/core/src/main/java/hudson/model/TaskAction.java trunk/hudson/main/core/src/main/java/hudson/triggers/SCMTrigger.java trunk/hudson/main/core/src/main/resources/hudson/model/Run/console.jelly trunk/hudson/main/core/src/main/resources/hudson/model/TaskAction/log.jelly trunk/hudson/main/core/src/main/resources/hudson/slaves/SlaveComputer/log.jelly trunk/hudson/main/test/src/test/java/hudson/console/ConsoleAnnotatorTest.java trunk/www/changelog.html http://jenkins-ci.org/commit/28764 Log: [FIXED JENKINS-5941] in 1.352. Keep progressiveText for text/plain and serve text/html from a different URL.
          Hide
          jglick Jesse Glick added a comment - - edited

          Does not seem to completely work in one test case I tried, or rather seems to have introduced some other regression. /console says

          Started by user anonymous
          FATAL: Unable to find build script at /space/src/hudson/trunk/main/war/work/jobs/JavaLibrary75/workspace/build.xml
          Archiving artifacts
          Publishing Javadoc
          Finished: FAILURE
          

          which is fine, whereas /consoleText says

          Started by user anonymous
          FATAL: Unable to find build script at /space/src/hudson/trunk/main/war/work/jobs/JavaLibrary75/workspace/build.xml
          [8mha:AAAAVx+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0m1W6NqK7pC2JmJgaGiiEEKTYMzhAYpZIAARpDCAgBF2FTYYAAAAA==[0mArchiving artifacts
          Publishing Javadoc
          Finished: FAILURE
          

          and that is also what the NetBeans view displays. However if I pick a different build step, then it is fine, so I do not know how to reproduce this problem:

          Started by user anonymous
          [workspace] $ /bin/sh -xe /tmp/hudson2488161195139259538.sh
          + echo hello world #1
          hello world #1
          + echo hello world #2
          hello world #2
          + echo hello world #3
          hello world #3
          + echo hello world #4
          hello world #4
          + echo hello world #5
          hello world #5
          + echo hello world #6
          hello world #6
          + echo hello world #7
          hello world #7
          + echo hello world #8
          hello world #8
          + echo hello world #9
          hello world #9
          + echo hello world #0
          hello world #0
          Finished: SUCCESS
          

          So I am unsure whether the garbage in the first build log was due to some regression introduced by this change, or some unrelated problem. At least it is no longer displaying HTML.

          Show
          jglick Jesse Glick added a comment - - edited Does not seem to completely work in one test case I tried, or rather seems to have introduced some other regression. /console says Started by user anonymous FATAL: Unable to find build script at /space/src/hudson/trunk/main/war/work/jobs/JavaLibrary75/workspace/build.xml Archiving artifacts Publishing Javadoc Finished: FAILURE which is fine, whereas /consoleText says Started by user anonymous FATAL: Unable to find build script at /space/src/hudson/trunk/main/war/work/jobs/JavaLibrary75/workspace/build.xml [8mha:AAAAVx+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0m1W6NqK7pC2JmJgaGiiEEKTYMzhAYpZIAARpDCAgBF2FTYYAAAAA==[0mArchiving artifacts Publishing Javadoc Finished: FAILURE and that is also what the NetBeans view displays. However if I pick a different build step, then it is fine, so I do not know how to reproduce this problem: Started by user anonymous [workspace] $ /bin/sh -xe /tmp/hudson2488161195139259538.sh + echo hello world #1 hello world #1 + echo hello world #2 hello world #2 + echo hello world #3 hello world #3 + echo hello world #4 hello world #4 + echo hello world #5 hello world #5 + echo hello world #6 hello world #6 + echo hello world #7 hello world #7 + echo hello world #8 hello world #8 + echo hello world #9 hello world #9 + echo hello world #0 hello world #0 Finished: SUCCESS So I am unsure whether the garbage in the first build log was due to some regression introduced by this change, or some unrelated problem. At least it is no longer displaying HTML.

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              jglick Jesse Glick
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: