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

Expose NewNodeConsoleNote as Beta.class so LogStorage implementations can interact with it #377

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

dwnusbaum
Copy link
Member

@dwnusbaum dwnusbaum commented Aug 21, 2023

NewNodeConsoleNote is special in that custom Pipeline log visualizers that are not based on the Jenkins ConsoleNote-related APIs likely still want to display the associated lines differently or suppress them entirely (see additional discussion in #371) rather than just ignoring the markup and showing the raw text content.

For my use case, I can get away with only checking a hard-coded class name against ConsoleNote.readFrom(...).getClass().getName() in production code (in fact I can actually reference the class literal due to jenkinsci/lib-access-modifier#166), but I would like to mark this class as @Restricted(Beta.class) to make it clearer that API changes should be considered carefully and that incompatible changes should probably be moved to a different class. I would also like to be able to use NewNodeConsoleNote.print in tests without having to worry that the API is going to be modified unnecessarily, and to be able to reference the class literal in production code if jenkinsci/lib-access-modifier#166 is fixed.

Testing done

Submitter checklist

Preview Give feedback

@dwnusbaum dwnusbaum requested a review from a team as a code owner August 21, 2023 18:50
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Seems reasonable; the bar is low enough for Beta and I do not know of any particular plans to rename or delete this class (there is not much signature inside it to change).

@jglick jglick merged commit d9fa65f into jenkinsci:master Aug 21, 2023
@dwnusbaum dwnusbaum deleted the expose-NewNodeConsoleNote branch August 21, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants