Skip to content

Fix streaming partial lines in overallLog#520

Draft
das7pad wants to merge 4 commits into
jenkinsci:masterfrom
das7pad:fix-streaming-partial-line
Draft

Fix streaming partial lines in overallLog#520
das7pad wants to merge 4 commits into
jenkinsci:masterfrom
das7pad:fix-streaming-partial-line

Conversation

@das7pad
Copy link
Copy Markdown
Contributor

@das7pad das7pad commented Jun 2, 2026

This PR is fixing the streaming of partial lines in the overallLog by adopt AnnotatedLargeText#writeHtmlToFilter to do the heavy lifting.

Testing done

See jenkinsci/jenkins#26871

Inspect network, see consoleAnnotator in meta multi-part field of the progressiveHtml response when looking at the overall log.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

Adopt AnnotatedLargeText#writeHtmlToFilter to do the heavy lifting of
the fix.
@das7pad das7pad requested a review from a team as a code owner June 2, 2026 22:07
@das7pad
Copy link
Copy Markdown
Contributor Author

das7pad commented Jun 2, 2026

This is ready for review, but tests will fail until I adopt the incremental from jenkinsci/jenkins#26871. I've hit a flakey run there and don't want to wait for CI to pass today. Will take another look tomorrow.

@das7pad
Copy link
Copy Markdown
Contributor Author

das7pad commented Jun 4, 2026

What's missing for adopting the incremental? (Locally mvn hpi:run and mvn test are working fine.)

https://ci.jenkins.io/job/Plugins/job/workflow-api-plugin/job/PR-520/3/stages/?start-byte=0&selected-node=60#log-60-12

19:58:27  [ERROR] Non-resolvable import POM: The following artifacts could not be resolved: org.jenkins-ci.main:jenkins-bom:pom:2.568-rc38327.64a_f81969036 (absent): Could not find artifact org.jenkins-ci.main:jenkins-bom:pom:2.568-rc38327.64a_f81969036 in artifact-caching-proxy (http://k8s-artifact-artifact-3d1949c260-a3739c22ffe2d924.elb.us-east-2.amazonaws.com:8080/) @ org.jenkins-ci.plugins:plugin:6.2153.vcf31911d10c4, /home/jenkins/agent/workspace/ugins_workflow-api-plugin_PR-520@tmp/m2repo/org/jenkins-ci/plugins/plugin/6.2153.vcf31911d10c4/plugin-6.2153.vcf31911d10c4.pom, line 198, column 19
19:58:27  [ERROR] 'dependencies.dependency.version' for jakarta.servlet:jakarta.servlet-api:jar is missing. @ org.jenkins-ci.plugins:plugin:6.2153.vcf31911d10c4, /home/jenkins/agent/workspace/ugins_workflow-api-plugin_PR-520@tmp/m2repo/org/jenkins-ci/plugins/plugin/6.2153.vcf31911d10c4/plugin-6.2153.vcf31911d10c4.pom, line 273, column 17
19:58:27  [ERROR] 'dependencies.dependency.version' for commons-logging:commons-logging:jar is missing. @ org.jenkins-ci.plugins:plugin:6.2153.vcf31911d10c4, /home/jenkins/agent/workspace/ugins_workflow-api-plugin_PR-520@tmp/m2repo/org/jenkins-ci/plugins/plugin/6.2153.vcf31911d10c4/plugin-6.2153.vcf31911d10c4.pom, line 278, column 17

@jglick
Copy link
Copy Markdown
Member

jglick commented Jun 5, 2026

I had hoped https://ci.jenkins.io/job/Plugins/job/workflow-api-plugin/job/PR-520/3/execution/node/39/log/ would be sufficiently discoverable but apparently not. 😞

BTW please keep the PR in draft while consuming an incremental version, just as a reminder (it would not be mergeable in any case).

@das7pad
Copy link
Copy Markdown
Contributor Author

das7pad commented Jun 6, 2026

Thanks for the hint!

I had hoped https://ci.jenkins.io/job/Plugins/job/workflow-api-plugin/job/PR-520/3/execution/node/39/log/ would be sufficiently discoverable but apparently not. 😞

Ah, that's a recent change from jenkins-infra/pipeline-library#991.

I did not scroll all the way up and inspect the "successful" part of the pipeline. WDYT about failing the build at that echo step when an -rc version is used in the pom.xml? Something like this to make it easy to discover:

- echo 'Forbidding use...'
+ String msg = 'Forbidding use ...'
+ if (readFile('pom.xml').contains('-rc')) {
+   error msg
+ } else {
+   echo msg
+ }

I can send a PR your way if you are happy with this approach.

@das7pad das7pad marked this pull request as draft June 6, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log output is incorrect when log lines delay arrival of new-line character

2 participants