Expose NewNodeConsoleNote
as Beta.class
so LogStorage
implementations can interact with it
#377
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NewNodeConsoleNote
is special in that custom Pipeline log visualizers that are not based on the JenkinsConsoleNote
-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 useNewNodeConsoleNote.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