oxidecomputer / oxidecomputer/omicron

want `omdb db --destructive` command for manually creating an alert

Open
#10,823 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

fault-management Good for new hires non-important non-blocker Testing & Analysis
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.