-
Notifications
You must be signed in to change notification settings - Fork 43
[2/n][omdb] add initial webhook receiver OMDB commands #7808
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
Merged
Conversation
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
da8cfb6
to
4653031
Compare
hawkw
added a commit
that referenced
this pull request
Apr 28, 2025
This branch adds an MVP implementation of the internal machinery for delivering webhooks from Nexus. This includes: - webhook-related external API endpoints (as described in [RFD 538]) - database tables for storing webhook receiver configurations and webhook events, and for tracking their delivery status - background tasks for actually delivering webhook events to receivers The user-facing interface for webhooks is described in greater detail in [RFD 538]. The code change in this branch includes a ["Big Theory Statement" comment] that describes most of the implementation details, so reviewers are encouraged to refer to that for more information on the implementation. ## Future Work Immediate follow-up work (i.e. stuff I'd like to do shortly but would prefer to land in separate PRs): - [ ] Garbage collection for old records in the `webhook_delivery`, `webhook_delivery_attempt`, and `webhook_event` CRDB tables (need to figure out a good retention policy for events) - [ ] `omdb db webhooks` commands for actually looking at the webhook database tables (#7808) - [ ] Oximeter metrics tracking webhook delivery attempt outcomes and latencies Not currently planned, but possible future work: - [ ] Actually record webhook events when stuff happens :) - [ ] Some mechanism for communicating JSON schemas for webhook event payloads (either via OpenAPI 3.1, by sticking JSON schemas in the `/v1/webhooks/event-classes` endpoints, or both) - [ ] Allow webhook receivers to have roles with more restrictive permissions than `fleet.viewer` (see [RFD 538 Appendix B.3](https://rfd.shared.oxide.computer/rfd/538#rbac-filtering)); probably requires service accounts - [ ] Track receiver liveness and alert when a receiver has gone away (see [RFD 538 Appendix B.4](https://rfd.shared.oxide.computer/rfd/538#liveness)) ["Big Theory Statement" comment]: https://github.com/oxidecomputer/omicron/blob/143b34b1eeac68ce9ec7a50a0fbabafadec9f444/nexus/src/app/webhook.rs#L5-L131 [RFD 538]: https://rfd.shared.oxide.computer/rfd/538
This commit adds some quick OMDB commands for listing and displaying webhook receivers. Subsequent commits will also add support for inspecting event deliveries to receivers, but I wanted to get the basic stuff in first.
eb6bc4e
to
92232ec
Compare
this should make life easier in the future (e.g. no merge conflicts)
smklein
approved these changes
Apr 29, 2025
Co-authored-by: Sean Klein <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
As a follow-up from #7277, this commit adds some OMDB commands for querying and displaying the status of webhook receivers and webhook deliveries.