logstash/qa/integration/specs
Ry Biesemeyer 0ec16ca398
Unicode pipeline and plugin ids (#15971)
* 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
2024-06-25 08:35:28 -07:00
..
cli Fix flaky logstash-plugin IT test (#15803) 2024-01-18 14:59:08 +02:00
01_logstash_bin_smoke_spec.rb Rubocop: Enable SpaceBefore cops (#15197) 2023-07-18 22:32:17 -04:00
beats_input_spec.rb Logstash core integration tests for Logstash to Logstash communication. (#15541) 2023-11-28 10:02:22 -08:00
command_line_spec.rb Fixed functional test in case the LS_JAVA_HOME is configured (#15535) 2023-11-10 11:01:42 +01:00
deprecation_log_spec.rb Rubocop: Enable SpaceBefore cops (#15197) 2023-07-18 22:32:17 -04:00
direct_heap_allocator_flag_spec.rb Introduce a new setting to give preference to Java heap or direct space buffer allocation type (#16054) 2024-04-10 15:23:47 +02:00
dlq_spec.rb Fix a few lint format issues 2023-10-10 09:00:54 -04:00
env_variables_condition_spec.rb Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon (#15180) 2023-07-14 16:46:35 -04:00
env_variables_config_spec.rb Fix instances of deprecated class methods (#15183) 2023-07-17 11:32:46 -04:00
es_output_how_spec.rb Rubocop: Enable various EmptyLine cops (#15194) 2023-07-18 16:49:16 -04:00
fatal_error_spec.rb Rubocop: Enable most SpaceInside cops (#15201) 2023-07-20 09:49:46 -04:00
install_java_plugin_spec.rb Rubocop: Enable various EmptyLine cops (#15194) 2023-07-18 16:49:16 -04:00
java_api_spec.rb Rubocop: Enable various EmptyLine cops (#15194) 2023-07-18 16:49:16 -04:00
kafka_input_spec.rb Rubocop: Enable SpaceAround cops (#15196) 2023-07-18 21:11:57 -04:00
logstash_to_logstash_spec.rb Logstash core integration tests for Logstash to Logstash communication. (#15541) 2023-11-28 10:02:22 -08:00
mixed_codec_spec.rb Rubocop: Enable SpaceBefore cops (#15197) 2023-07-18 22:32:17 -04:00
monitoring_api_spec.rb Unicode pipeline and plugin ids (#15971) 2024-06-25 08:35:28 -07:00
multiple_pipeline_spec.rb Rubocop: Enable various EmptyLine cops (#15194) 2023-07-18 16:49:16 -04:00
pipeline_log_spec.rb Rubocop: Enable SpaceBefore cops (#15197) 2023-07-18 22:32:17 -04:00
plugin_name_log_spec.rb Rubocop: Enable SpaceBefore cops (#15197) 2023-07-18 22:32:17 -04:00
reload_config_spec.rb flow_metrics: pull worker_utilization up to pipeline-level (#15912) 2024-02-06 11:50:34 -08:00
reserved_tags_field_spec.rb Rubocop: Enable various EmptyLine cops (#15194) 2023-07-18 16:49:16 -04:00
secret_store_spec.rb Enable SpaceAfterColon, SpaceAfterComma, SpaceAfterSemicolon (#15180) 2023-07-14 16:46:35 -04:00
settings_spec.rb Fix instances of deprecated class methods (#15183) 2023-07-17 11:32:46 -04:00
slowlog_spec.rb Rubocop: Enable SpaceBefore cops (#15197) 2023-07-18 22:32:17 -04:00
spec_helper.rb Fix serverless test for api protection (#15252) 2023-08-16 14:02:11 +01:00
webserver_spec.rb Enable Style/TrailingEmptyLines and fix ocurrences (#15179) 2023-07-14 14:46:33 -04:00