Skip to content

Conversation

@hawkw
Copy link
Member

@hawkw hawkw commented Mar 17, 2025

As a follow-up from #7277, this commit adds some OMDB commands for querying and displaying the status of webhook receivers and webhook deliveries.

@hawkw hawkw mentioned this pull request Mar 17, 2025
7 tasks
@hawkw hawkw force-pushed the eliza/om-deeby-deeby-webhooks branch from da8cfb6 to 4653031 Compare March 18, 2025 16:58
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
Base automatically changed from eliza/webhook-models to main April 28, 2025 18:28
hawkw added 6 commits April 28, 2025 14:26
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.
@hawkw hawkw force-pushed the eliza/om-deeby-deeby-webhooks branch from eb6bc4e to 92232ec Compare April 28, 2025 23:38
@hawkw hawkw marked this pull request as ready for review April 28, 2025 23:39
@hawkw hawkw requested a review from smklein April 28, 2025 23:40
hawkw and others added 2 commits April 29, 2025 11:25
Co-authored-by: Sean Klein <sean@oxide.computer>
@hawkw hawkw enabled auto-merge (squash) April 29, 2025 18:50
@hawkw hawkw merged commit 28532e6 into main Apr 30, 2025
16 checks passed
@hawkw hawkw deleted the eliza/om-deeby-deeby-webhooks branch April 30, 2025 19:27
@hawkw hawkw added the fault-management Everything related to the fault-management initiative (RFD480 and others) label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fault-management Everything related to the fault-management initiative (RFD480 and others)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants