Skip to content

Fix "**" wildcard validation for correct json parsing#449

Merged
urvisavla merged 3 commits intostellar:protocol-23from
urvisavla:getevents-wildcard-fix
May 28, 2025
Merged

Fix "**" wildcard validation for correct json parsing#449
urvisavla merged 3 commits intostellar:protocol-23from
urvisavla:getevents-wildcard-fix

Conversation

@urvisavla
Copy link
Contributor

@urvisavla urvisavla commented May 27, 2025

What

In #419, we added the "**" wildcard filter for flexible topic matching, restricted to the last segment. This restriction was enforced in SegmentFilter which broke json parsing during request unmarshaling. This fix moves the "**" validation to TopicFilter to ensure correct parsing as well as placement checks.

changelog entry has also been added.

Known limitations

N/A

@urvisavla urvisavla force-pushed the getevents-wildcard-fix branch from e4aa599 to 4597e96 Compare May 28, 2025 00:26
@urvisavla urvisavla changed the title Fix json parsing bug for "**" wildcard in topic filters Fix "**" wildcard validation for correct json parsing May 28, 2025
@urvisavla urvisavla marked this pull request as ready for review May 28, 2025 06:41
@urvisavla urvisavla requested review from a team, 2opremio and Shaptic May 28, 2025 06:55
@2opremio
Copy link
Contributor

2opremio commented May 28, 2025

Wouldn't it make more sense to target the main branch? (since it's not protocol-23 specific AFAICT)

(we will merge the protocol-23 branch into main before releasing anyways)

@urvisavla
Copy link
Contributor Author

Wouldn't it make more sense to target the main branch? (since it's not protocol-23 specific AFAICT)

(we will merge the protocol-23 branch into main before releasing anyways)

The original issue #358 was tagged protocol-23 so I added the feature in protocol-23 branch. This feature doesn't exist in main yet.

Copy link
Contributor

@sreuland sreuland left a comment

Choose a reason for hiding this comment

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

lgtm, thorough test coverage!

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Nice test coverage for the new feature 👏

@urvisavla urvisavla merged commit ba156cb into stellar:protocol-23 May 28, 2025
10 of 13 checks passed
@urvisavla urvisavla deleted the getevents-wildcard-fix branch May 28, 2025 20:34
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