Skip to content

Conversation

@donoghuc
Copy link
Contributor

This commit updates the expectation for the message when max bytes is exceeded to be more flexible. Instead of an exact match it expects a regex. This allows slight changes in the error message.

Thanks for contributing to Logstash! If you haven't already signed our CLA, here's a handy link: https://www.elastic.co/contributor-agreement/

This commit updates the expectation for the message when max bytes is exceeded to be more flexible. Instead of an exact match it expects a regex. This allows slight changes in the error message.
@donoghuc
Copy link
Contributor Author

donoghuc commented Oct 17, 2025

This fixes all the cells other than SNAPSHOT=true ELASTIC_STACK_VERSION=main DOCKER_ENV=dockerjdk21.env. I believe this is likely due to a change in behavior with elastic/logstash@ba07878 It also seems related to #44 which is in progress

w Enable Watchlogstash-1 | Failures: w Enable Watchlogstash-1 | w Enable Watchlogstash-1 | 1) LogStash::Codecs::JSONLines default parser choice behaves like codec #decode decode_size_limits_bytes should raise an error if the max bytes are exceeded w Enable Watchlogstash-1 | Failure/Error: w Enable Watchlogstash-1 | expect { w Enable Watchlogstash-1 | subject.decode(maximum_payload << "z") w Enable Watchlogstash-1 | }.to raise_error(java.lang.IllegalStateException, /input buffer full/) w Enable Watchlogstash-1 | w Enable Watchlogstash-1 | expected Java::JavaLang::IllegalStateException with message matching /input buffer full/ but nothing was raised w Enable Watchlogstash-1 | Shared Example Group: :codec called from ./spec/codecs/json_lines_spec.rb:240 w Enable Watchlogstash-1 | # ./spec/codecs/json_lines_spec.rb:132:in `block in <main>' w Enable Watchlogstash-1 | w Enable Watchlogstash-1 | Finished in 3.01 seconds (files took 11.34 seconds to load) w Enable Watchlogstash-1 | 20 examples, 1 failure w Enable Watchlogstash-1 | w Enable Watchlogstash-1 | Failed examples: w Enable Watchlogstash-1 | w Enable Watchlogstash-1 | rspec ./spec/codecs/json_lines_spec.rb:131 # LogStash::Codecs::JSONLines default parser choice behaves like codec #decode decode_size_limits_bytes should raise an error if the max bytes are exceeded 
@donoghuc
Copy link
Contributor Author

The failure in main/9.2 is due to elastic/logstash#18321

For now the change proposed in this PR is still necessary, the fix for main/9.2 will be dependent on whatever we decide to do in logstash core.

Copy link
Member

@jsvd jsvd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@donoghuc donoghuc merged commit f05f762 into logstash-plugins:main Oct 30, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants