An agent log record with numeric params could be unformattable on the master #4621
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.
Noticed in a support bundle an agent log (
nodes/slave/…/jenkins.log
) withThis is from https://github.com/jenkinsci/remoting/blob/a09a8dd40e3269f578a503cee26b859e522ea6e2/src/main/java/hudson/remoting/RemoteInvocationHandler.java#L734-L745 but note the missing actual numbers (and
''
where'
was meant). The reason is because of https://github.com/openjdk/jdk/blob/6bab0f539fba8fb441697846347597b4a0ade428/src/java.logging/share/classes/java/util/logging/LogRecord.java#L561-L565 plus https://github.com/openjdk/jdk/blob/6bab0f539fba8fb441697846347597b4a0ade428/src/java.logging/share/classes/java/util/logging/Formatter.java#L146-L148.We could format every log record with parameters, which would be useful for code in the agent JVM doing something like
but I went for the more conservative fix here.
Proposed changelog entries
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate