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

feat: support re-sending events to event observers across restarts #5289

Merged
merged 8 commits into from
Oct 17, 2024

Conversation

obycode
Copy link
Contributor

@obycode obycode commented Oct 9, 2024

Description

Record events to be sent to event observers in a new sqlite database so that in the event that the node is killed before successfully sending, they can be re-sent on restart.

This is building on top of #5286.

Checklist

  • Test coverage for new or modified code paths
  • Changelog is updated
  • Required documentation changes (e.g., docs/rpc/openapi.yaml and rpc-endpoints.md for v2 endpoints, event-dispatcher.md for new events)
  • New clarity functions have corresponding PR in clarity-benchmarking repo
  • New integration test(s) added to bitcoin-tests.yml

Record events to be sent to event observers in a new sqlite database so
that in the event that the node is killed before successfully sending,
they can be re-sent on restart.
@obycode obycode requested review from a team as code owners October 9, 2024 03:05
@obycode
Copy link
Contributor Author

obycode commented Oct 9, 2024

I'll review these failing integration tests today.

@kantai
Copy link
Member

kantai commented Oct 9, 2024

I'll review these failing integration tests today.

I think a few are related to #5283

@saralab saralab requested review from kantai and wileyj October 9, 2024 14:36
@obycode
Copy link
Contributor Author

obycode commented Oct 9, 2024

tests::signer::v0::partial_tenure_fork and tests::nakamoto_integrations::continue_tenure_extend both pass locally.

@obycode
Copy link
Contributor Author

obycode commented Oct 11, 2024

All integration tests passed now after merging the latest develop and retrying failed tests once!

@saralab saralab requested a review from hstove October 11, 2024 14:43
@jcnelson jcnelson self-requested a review October 14, 2024 15:09
@ASuciuX
Copy link
Contributor

ASuciuX commented Oct 14, 2024

For mutants there are 2 missed tests and 1 unviable here.

Copy link
Contributor

@hstove hstove left a comment

Choose a reason for hiding this comment

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

Overall pretty much LGTM, but I'd like to see some tests and more explicit ordering of pending payloads we send

testnet/stacks-node/src/event_dispatcher.rs Outdated Show resolved Hide resolved
testnet/stacks-node/src/event_dispatcher.rs Show resolved Hide resolved
@obycode obycode requested a review from hstove October 14, 2024 19:45
hstove
hstove previously approved these changes Oct 14, 2024
Copy link
Collaborator

@jferrant jferrant left a comment

Choose a reason for hiding this comment

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

I am pretty sure I know the answer to my own questions. So will approve :)

@obycode obycode added this pull request to the merge queue Oct 17, 2024
Merged via the queue into develop with commit eb252e8 Oct 17, 2024
128 checks passed
@obycode obycode deleted the feat/recover-events branch October 21, 2024 13:10
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants