logstash/qa/integration/services
github-actions[bot] ff37802a77
Unicode pipeline and plugin ids (#15971) (#16257)
* 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 0ec16ca398)

Co-authored-by: Ry Biesemeyer <yaauie@users.noreply.github.com>
2024-06-25 09:46:55 -07:00
..
elasticsearch_service.rb buildkite serverless test (#15150) 2023-07-19 17:21:53 +01:00
elasticsearch_setup.sh Update releases list (#13149) 2021-08-20 08:24:58 +02:00
elasticsearch_teardown.sh Add wait functionality to stop_es integration test helper function 2020-06-30 14:07:01 -07:00
filebeat_service.rb Retrieve branch version of Filebeat via gradle (#11958) 2020-06-11 11:27:10 -04:00
filebeat_setup.sh Retrieve branch version of Filebeat via gradle (#11958) 2020-06-11 11:27:10 -04:00
helpers.sh Fix mismatched Java versions in integration tests (#14374) 2022-07-22 14:15:32 -04:00
http_proxy_service.rb Add apache and elastic license headers to source code files (#11673) 2020-03-11 11:53:38 +00:00
http_proxy_setup.sh Allow Logstash to accept a PROXY configuration 2017-03-31 14:20:38 -04:00
http_proxy_teardown.sh Allow Logstash to accept a PROXY configuration 2017-03-31 14:20:38 -04:00
kafka_service.rb Add apache and elastic license headers to source code files (#11673) 2020-03-11 11:53:38 +00:00
kafka_setup.sh Fix kafka download link for integration tests (#13248) 2021-09-27 10:40:03 -04:00
kafka_teardown.sh Quieten down kafka teardown script 2020-05-19 09:48:31 -04:00
logstash_service.rb Unicode pipeline and plugin ids (#15971) (#16257) 2024-06-25 09:46:55 -07:00
monitoring_api.rb Logstash core integration tests for Logstash to Logstash communication. (#15541) 2023-11-28 10:02:22 -08:00
service.rb Fix instances of deprecated class methods (#15183) 2023-07-17 11:32:46 -04:00
service_locator.rb Add apache and elastic license headers to source code files (#11673) 2020-03-11 11:53:38 +00:00