mirror of
https://github.com/elastic/logstash.git
synced 2025-04-22 05:37:21 -04:00
* fix: restore support for unicode pipeline- and plugin-id's
JRuby's `Ruby#newSymbol(String)` throws an exception when provided a `String`
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 new `RubyString` (which
works properly), and then rely on `RubyString#intern` to get our `RubySymbol`.
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.
* fix: use properly-encoded RubySymbol in PipelineConfig
We cannot rely on `RubySymbol#toString` to produce a properly-encoded `String`
whe the string contains characters above the lower-ASCII plane because the
result is effectively a binary ruby-internal marshal of the bytes that only
holds when the symbol contains lower-ASCII.
Instead, we can use the internally-memoizing `RubySymbol#name` to get a
properly-encoded `RubyString`, and `RubyString#asJavaString()` to get a
properly-encoded java-`String`.
* fix: properly serialize unicode pipeline names in API output
Jackson's JSON serializer leaks the JRuby-internal byte structure of Symbols,
which only aligns with the byte-structure of the symbol's actual string when
that string is wholly-comprised of lower-ASCII characters.
By pre-converting Symbols to Strings, we ensure that the result is readable
and useful.
* spec: bypass monitoring specs for unicode pipeline ids when PQ enabled
(cherry picked from commit
|
||
---|---|---|
.. | ||
elasticsearch_service.rb | ||
elasticsearch_setup.sh | ||
elasticsearch_teardown.sh | ||
filebeat_service.rb | ||
filebeat_setup.sh | ||
helpers.sh | ||
http_proxy_service.rb | ||
http_proxy_setup.sh | ||
http_proxy_teardown.sh | ||
kafka_service.rb | ||
kafka_setup.sh | ||
kafka_teardown.sh | ||
logstash_service.rb | ||
monitoring_api.rb | ||
service.rb | ||
service_locator.rb |