Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add filtering to non-subscription reads of $all #278

Merged

Conversation

NikodemMazur
Copy link
Contributor

@NikodemMazur NikodemMazur commented Jan 27, 2024

Added: an EventStore.Client.EventStoreClient.ReadAllAsync(...) overload accepting IEventFilter.

The change is to use EventStore/EventStore#3133

It'd be great to have this feature available.

If something is out of ordinary let me know :)

@RagingKore RagingKore self-requested a review January 30, 2024 10:35
Copy link
Contributor

@josephcummings josephcummings left a comment

Choose a reason for hiding this comment

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

Hey @NikodemMazur

Thanks for this PR and contribution 👍

The changes look OK with the exception of the tests you have added which are failing on the prev LTS, not your fault, though!

When ran against prev LTS server (v22.X.X) the tests fail because the system event PersistentConfig1 is being returned (which has OriginalStreamId $persistentSubscriptionConfig) and system events are expected to have been filtered out.

This is caused by this issue that has since been fixed in current LTS.

To get around this, I think the best approach would be to change the tests to instead filter out some custom events instead of system events, which will have been working since implemented on the server way back at v21.10.0

This will allow us to workaround this problem for the prev LTS CI, without straying from our tests expectation.... Happy to implement this from my side or let you take a stab at it, whatever works for you 🙂

@NikodemMazur NikodemMazur force-pushed the add-filtering-to-readallasync branch from a54fece to 9674db8 Compare January 30, 2024 18:38
@NikodemMazur
Copy link
Contributor Author

Thanks for the review and workaround suggestion, @josephcummings! I've applied the changes as advised. Let me know if any other adjustments are needed.

@josephcummings josephcummings merged commit 9ae7e8b into EventStore:master Jan 31, 2024
60 checks passed
@NikodemMazur NikodemMazur deleted the add-filtering-to-readallasync branch January 31, 2024 20:26
@NikodemMazur NikodemMazur restored the add-filtering-to-readallasync branch January 31, 2024 20:26
@NikodemMazur NikodemMazur deleted the add-filtering-to-readallasync branch January 31, 2024 20:26
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.

3 participants