Skip to content

Update regex for reason matching in Elasticsearch spec to support JRuby 10#1250

Merged
jsvd merged 3 commits intomainfrom
jsvd-patch-1
Mar 20, 2026
Merged

Update regex for reason matching in Elasticsearch spec to support JRuby 10#1250
jsvd merged 3 commits intomainfrom
jsvd-patch-1

Conversation

@jsvd
Copy link
Copy Markdown
Member

@jsvd jsvd commented Mar 20, 2026

No description provided.

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

@donoghuc
Copy link
Copy Markdown
Contributor

donoghuc commented Mar 20, 2026

I wonder if this is a good opportunity to move away from having assertions about string representations of ruby objects as the regex is gettting a bit complex to support both jruby 9/10. Without having looked too closely at what produces the data in question, maybe we could print individual fields or use to_json and parse that?

@jsvd
Copy link
Copy Markdown
Member Author

jsvd commented Mar 20, 2026

@claude do what Cas said:

I wonder if this is a good opportunity to move away from having assertions about string representations of ruby objects as the regex is gettting a bit complex to support both jruby 9/10. Without having looked too closely at what produces the data in question, maybe we could print individual fields or use to_json and parse that?

@jsvd
Copy link
Copy Markdown
Member Author

jsvd commented Mar 20, 2026

@copilot what about you, can you suggest a fix according to what Cas said in #1250 (comment) ?

Copy link
Copy Markdown

Copilot AI commented Mar 20, 2026

@jsvd I've opened a new pull request, #1251, to work on those changes. Once the pull request is ready, I'll request review from you.

@jsvd
Copy link
Copy Markdown
Member Author

jsvd commented Mar 20, 2026

@donoghuc unfortunately we're passing a string dlq_writer.write's second argument "reason", so we can't change what that string has (e.g. contain a marshalled json) without changing the shape of what currently goes to the dlq.
I think we can still change it and may not be necessarily a breaking change, but I think it becomes out of scope for this PR.

Copy link
Copy Markdown
Contributor

@donoghuc donoghuc left a comment

Choose a reason for hiding this comment

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

Given the complexity in the regex is confined to a single test assertion I think its low risk. Thanks for looking in to the alternative.

@jsvd jsvd merged commit 27b5c6c into main Mar 20, 2026
5 checks passed
@jsvd jsvd deleted the jsvd-patch-1 branch March 27, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants