-
Notifications
You must be signed in to change notification settings - Fork 155
feat: allows hook in the subscriptions #1309
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
Open
alepane21
wants to merge
59
commits into
master
Choose a base branch
from
topic/streams-v1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
38f8826
feat: add subscriptions hook
alepane21 824362b
chore: add tests of OnSubscriptionStartFn
alepane21 cdfa9bf
chore: remove duplicated test
alepane21 f8de362
chore: add test of error with Start method
alepane21 e500d1c
chore: document OnSubscriptionStartFn
alepane21 c970c07
Merge branch 'master' into ale/eng-7600-add-subscriptiononstarthandler
alepane21 2a6b5f0
chore: refactores the OnSubscriptionStart hook to be called from the …
alepane21 1e6ed5f
fix: behaviour when errors happend have been changed by mistake
alepane21 d776943
chore: change OnSubscriptionStart hook contract
alepane21 2f34327
chore: hooks now can decide if the subscription has to end
alepane21 dc89310
chore: events are written directly on the resolveCtx
alepane21 3cd5690
Merge branch 'master' into ale/eng-7600-add-subscriptiononstarthandler
alepane21 bfad223
chore: improve test
alepane21 91dbadd
chore: improve names to align with the ones in the ADR of the router
alepane21 207adf7
chore: execute hooks inside worker, so that we don't block the main l…
alepane21 3257c52
fix: if only one event was to be skipped, every event was skipped! re…
alepane21 ec79b06
chore: remove now useless handleTriggerUpdateSubscription
alepane21 e74d079
chore: send updates on subscription on time (there is still a data ra…
alepane21 41b92a0
chore: avoid workChan races
alepane21 7bb7431
chore: lint issue
alepane21 e0845be
Merge branch 'master' into ale/eng-7600-add-subscriptiononstarthandler
alepane21 3b61ef2
chore: rename SubscriptionOnStartFns to StartupHooks for clarity
alepane21 ae55c92
Merge remote-tracking branch 'origin/master' into ale/eng-7600-add-su…
alepane21 87cb3a8
Merge remote-tracking branch 'origin/ale/eng-7600-add-subscriptionons…
alepane21 ea8ab75
chore: wait for the initial hook execution before starting the dataso…
alepane21 2ed6134
fix: avoid locking worker goroutine if the trigger was already set up
alepane21 5fa5a76
chore: add test to verify Resolve beahviour with more than one subscr…
alepane21 8731ff2
chore: remove return close option
alepane21 6793f09
chore: HookableSubscriptionDataSource should also be without close
alepane21 fdf829a
chore: fix initialHooksClose value
alepane21 7b569b6
chore: simplify hooks implementation
alepane21 4a94540
chore: remove pinned subscription
alepane21 a673838
chore: remove unused code, fix naming
alepane21 46d97b2
chore: fix test
alepane21 447c103
chore: avoid data source start if the subscription should close
alepane21 7bb99a5
chore: improve resolve structure
alepane21 f8c9d06
chore: type
alepane21 baec1da
chore: readd pinned updater to sub
alepane21 2100f14
chore: simplify events flow
alepane21 311b021
chore: fix compile issues
StarpTech e0af0a0
chore: fix tests
alepane21 f4eba63
chore: remove pubsub datasource implementations and related tests, it…
alepane21 0efce3c
test: add new test for handling multiple subscriptions with the same …
alepane21 6234791
chore: execute startup hooks inside worker go routine
alepane21 8df1b67
chore: remove parameter not used anymore
alepane21 a0024f0
chore: add subscription to registry after startup hooks execution
alepane21 f87d764
feat: add subscription management methods to subscriptionUpdater
alepane21 ddc652f
Merge branch 'topic/streams-v1' into ale/eng-7600-add-subscriptionons…
dkorittki 1d6b668
Merge branch 'ale/eng-7600-add-subscriptiononstarthandler' into ale/e…
dkorittki 2391c87
fix: implement missing subscription updater methods (#1310)
dkorittki 15d578b
fix: don't send heartbeat on some subscription resolver tests (#1313)
dkorittki ba9a827
Merge branch 'master' into topic/streams-v1
dkorittki 17f8612
Merge branch 'master' into dominik/merge-upstream-to-cosmo-streams
dkorittki 1353de9
fix: fix flaky engine subscription tests (#1318)
dkorittki 06f55f1
Merge branch 'topic/streams-v1' into dominik/merge-upstream-to-cosmo-…
dkorittki 1461a66
Merge branch 'master' into topic/streams-v1
dkorittki 2477b88
fix: provide missing methods to test updater
dkorittki 067b413
Merge branch 'master' into topic/streams-v1
dkorittki 423a60c
fix: only return early on error from hook call
dkorittki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 0 additions & 72 deletions
72
v2/pkg/engine/datasource/pubsub_datasource/kafka_event_manager.go
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment to match the implementation.
The comment states "Each hook is called in a separate goroutine," but the implementation executes hooks sequentially on lines 2012-2017. This mismatch could confuse future maintainers about the execution model.
Apply this diff to fix the comment:
🤖 Prompt for AI Agents