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.
Release notes
pipeline.id
's caused the pipeline to fail to start up.What does this PR do?
JRuby's
Ruby#newSymbol(String)
throws an exception when provided aString
that contains characters outside of lower-ASCII because JRuby internals expect "the incoming String to be one of our mangled ISO-8859-1 strings" as noted in a comment on jruby/jruby#6217.Instead, we use
Ruby#newString(String)
to create a newRubyString
(which works properly), and then rely onRubyString#intern
to get ourRubySymbol
.This fixes a regression introduced in the 8.7 series in which pipeline id's are consistently represented as ruby symbols in the metrics store, and ensures similar issue does not exist when specifying a plugin id that contains characters above the lower-ASCII plane.
This patch fixes related serialization issues when either plugin id's or pipeline id's contain characters outside the lower-ASCII plane.
Why is it important/What is the impact to the user?
Accented characters like umlauts have historically been supported in
pipeline.id
, and are useful in locales where they are meaningful.Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files (and/or docker env variables)How to test this PR locally
Run a pipeline whose
pipeline.id
has unicode characters:Observe that the pipeline starts, and log messages include the pipeline id correctly:
Observe that the API responses contain the pipeline and plugin names correctly-encoded:
Related issues
Closes: #15968