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 logpoller.FilteredLogs and support for filtering on subkey #1020

Merged
merged 7 commits into from
Jan 27, 2025

Conversation

reductionista
Copy link
Contributor

@reductionista reductionista commented Jan 17, 2025

This adds FilteredLogs to logPoller.Service to complete the LogPoller API, as well as these functions and types in parser.go to support filtering events by subkeys:

func NewEventBySubkeyFilter(subkeyIndex uint64, valueComparers []primitives.ValueComparator) (query.Expression, error)
func (v *pgDSLParser) VisitEventSubkeysByValueFilter(p *eventBySubkeyFilter)
type IndexedValueComparator

Also adds a test for filtering on subkeys to parser_test.go

Supports: #1016

pkg/solana/chain.go Outdated Show resolved Hide resolved
Copy link
Contributor

@ilija42 ilija42 left a comment

Choose a reason for hiding this comment

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

Its a bit hard to review because it has all the changes from the filter PR, can you point this to improve-lp-codec-usage

@reductionista
Copy link
Contributor Author

reductionista commented Jan 21, 2025

Its a bit hard to review because it has all the changes from the filter PR, can you point this to improve-lp-codec-usage

It's all in a single commit, so I figured it wouldn't be too difficult to look at... probably should have linked to the commit directly instead of the PR:
ce7cdc2

The Log Processing PR has been waiting for CODEOWNER approval since Thursday, not sure what the holdup is I was hoping it would be merged already. Otherwise I would have raised this against that branch instead of against develop. Hopefully will get merged quickly on Tues so I can just rebase onto develop.

EasterTheBunny
EasterTheBunny previously approved these changes Jan 22, 2025
@reductionista reductionista marked this pull request as ready for review January 22, 2025 20:36
@reductionista reductionista requested a review from a team as a code owner January 22, 2025 20:36
# Conflicts:
#	pkg/solana/logpoller/log_poller.go
#	pkg/solana/logpoller/log_poller_test.go
#	pkg/solana/logpoller/test_helpers.go
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
52.8% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube

@toblich toblich merged commit 53e1332 into develop Jan 27, 2025
35 of 36 checks passed
@toblich toblich deleted the filtered_logs branch January 27, 2025 19: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