Skip to content

Conversation

@das7pad
Copy link
Contributor

@das7pad das7pad commented Oct 8, 2025

Instead of reading the entire step log into memory before emitting it in the JSON response, this PR is using the streaming based reading for step logs from stapler/Jenkins core.

I've kept the old consoleLog endpoint as it is part of the API docs. What is the policy for removing endpoints?

The new streaming mode ships logs as is, without stopping at the line end. So we need to glue lines back together, see added test incremental log fetching > when gluing lines together.

For later: use ?searchNewLineUntil when fetching more logs to avoid displaying partial lines.

Testing done

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

@das7pad das7pad requested a review from a team as a code owner October 8, 2025 23:11
@timja
Copy link
Member

timja commented Oct 9, 2025

Build locally (Using the incrementals locally does not seem to work for me)

If you're using IntelliJ you need to enable the consume-incrementals profile. There's a bug in IntelliJ where it doesn't read profiles from .mvn/maven.config

(I can't find the bug report right now but I'm pretty sure its reported: https://youtrack.jetbrains.com/issues?q=%7Bmaven.config%7D%20%7Bprofiles%7D%20state:%20Open&sort=state)

image

@timja timja added the enhancement New feature or request label Oct 9, 2025
@timja
Copy link
Member

timja commented Oct 9, 2025

I think its unlikely people are using it, the more likely APIs are the ones for stages and steps.

I would prefer to remove it if its no longer in use for the plugin. If people are using it we can restore it and mark as deprecated, removing after some time.

@timja
Copy link
Member

timja commented Oct 9, 2025

You say part of #704

Isn't this PR the last in the chain and it will fix the issue?

@das7pad
Copy link
Contributor Author

das7pad commented Oct 9, 2025

You say part of #704

Isn't this PR the last in the chain and it will fix the issue?

Indeed, I've updated the link to "Fixes".

@das7pad
Copy link
Contributor Author

das7pad commented Oct 10, 2025

The tests should pass now. I used the wrong incremental for Jenkins core (jenkinsci/jenkins#11071 -> jenkinsci/jenkins#11177).

@timja timja marked this pull request as draft October 10, 2025 07:00
pom.xml Outdated
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>1395.v515f67ea_db_10</version>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/jenkinsci/workflow-api-plugin/releases/tag/1398.v67030756d3fb_

Thanks for creating the release, @timja ! What's the preferred method for adopting it? Bump the version in the pom.xml here or pull in the upgrade through BOM after the next dependabot update cycle?

https://github.com/jenkinsci/bom/blob/645d8bdc5d54d123155182426ffba1fe6b241460/bom-weekly/pom.xml#L34

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either is fine

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.1762.vd3ff902a_5b_c4:validate-hpi (default-validate-hpi) on project pipeline-graph-view: Dependency org.jenkins-ci.plugins.workflow:workflow-api:jar:1398.v67030756d3fb_ requires Jenkins 2.532 or higher.

🕵️ I'm currently on 2.532-rc37610.379ef8546550, which should satisfy >=2.532, no? I'll try to get a new incremental for Jenkins with 2.533.

<jenkins.version>2.532-rc37610.379ef8546550</jenkins.version>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Viewing large logs runs out of memory

2 participants