oxidecomputer / oxidecomputer/omicron
want `omdb db --destructive` command for manually creating an alert
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
See https://github.com/oxidecomputer/product-assurance/issues/284#issuecomment-4974066769 --- it would be nice to have a way to manually create an alert from omdb for testing purposes. This should be pretty simple to wire up: an omdb db --destructive alert create command would take an alert class and version argument, and a JSON payload, and just blast it into the omicron.public.alert table using DataStore::alert_create. It would then print out the UUID of the created alert so that Paulina's tests can watch for that UUID being delivered.
Having this is not particularly urgent, since (as I mentioned in https://github.com/oxidecomputer/product-assurance/issues/284#issuecomment-4974066769) we already have integration tests in Omicron that exercise most of what this would let us test. But, it could still be helpful to have real end to end testing for it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading DataStore::alert_create in nexus/db-queries/src/db/datastore/alert.rs, then locate the omdb db command implementation and its handling of destructive subcommands. Confirm the alert class, version, and JSON payload arguments, and verify that the command prints the created alert UUID for end-to-end tests to observe.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100