Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins 33833: get history to work again in batch tasks #14

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

lacostej
Copy link
Contributor

@lacostej lacostej commented Nov 2, 2023

The batch task history has been broken for a while. See https://issues.jenkins.io/browse/JENKINS-33833 for discussion and analysis.

This is a quick&dirty test to get this working again.

The PR currently sits on top of #11 which I hope to merge soon.

I would like some feedback on the approach and the direction of the feature from people with more knowledge of the internals and direction of Jenkins.

Implementation notes

Given that the HistoryPageFilter#add() logic, there were at least 3 options:

  • fix Jenkins to support the batch plugin. My guest is that this is unlikely to happen.
  • get the plugin to behave like a Job
  • get the plugin to behave like a QueueItem

I implemented a very rough "like a Job" solution and it starts giving some result, although plenty is still broken and it doesn't have any code to manage migration for now.

image

One issue that I am definitely seeing right away is that in my current implementation, the BatchRun became a Run subclass, and I am not able to serialize it nested in the build log anymore.

        <hudson.plugins.batch__task.BatchRun resolves-to="hudson.model.Run$Replacer">

I've attempted a different design (different branch), where I pass adapter classes to the build history widget, but the Run class doesn't allow to set its state at Runtime.

More info in the issue.

Testing done

Submitter checklist

Preview Give feedback

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.

1 participant