-
Notifications
You must be signed in to change notification settings - Fork 124
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-27394] Collapsible sections in log #21
Conversation
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
Particularly useful in jenkinsci/parallel-test-executor-plugin#20. |
private final String id; | ||
|
||
private ShowHideNote(String id, int length) { | ||
super("#", length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well use "#" + id
here and add an a
tag in logNodeMessage
, allowing us to create direct links to the section—useful for getLogURL
in jenkinsci/workflow-basic-steps-plugin#2, for example.
Putting this on hold until JENKINS-38381 is done. |
/** | ||
* Encodes the block-scoped nesting of a step. | ||
*/ | ||
public class NestingNote extends ConsoleNote<Run<?,?>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐛 needs to be Object
to avoid breaking per-step LogAction
display
Closing in favor of #27. |
…y encompassing all of the functionality of jenkinsci#21.
JENKINS-27394
Downstream of #20.
I initially thought to add visual bounding boxes, as the Collapsing Console Sections plugin does. But this would not work with
parallel
steps at all, and it seemed clumsy to show bounding boxes unless you were inside a branch.A more radical alternative would be to never show multiple branches interleaved at all, and have a special control at the start of a
parallel
branch allowing you to select which branch to display. This would usually be fine, but there are also some cases where you actually want to know what happened in which order; Pipeline captures this information and it would be a shame to throw it away. The likely replacement would be to bake in the equivalent of thetimestamper
wrapper so you could manually compare timestamps between branches in cases where this was important for debugging something.Note a little log cleanup in jenkinsci/workflow-support-plugin#10. The longer-term plan is to interleave all output into a single log file internally, with flow node (and perhaps timestamp) metadata captured at point of origin, and various visualizations like the annotated console log able to display the data however they prefer.
@reviewbybees