oxidecomputer / oxidecomputer/omicron

DB schema: Remove `update` variant from `database_kind`

Open
#8,268 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cleanup database
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

DatasetKind::Update and its associated database enum variant update were added when we thought TUF repo artifacts would be stored on U.2 drives (and therefore need datasets set up by reconfigurator). We've since changed to storing them on the M.2s, and sled-agent sets up the necessary datasets autonomously.

In an #8301 we're removing the DatasetKind::Update Rust variant. However, removing variants from a database variant is an annoying amount of work, so we've punted on this for now in favor of urgency. The practical impact of this should be small: if we read an update value from the database (which should never happen), we'll return a runtime error. If we don't get to this on its own merits, the next time we go through the process of modifying dataset_kind for some other reason, we should prune this variant.

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 with the schema/crdb guide on changing enum variants and compare the database change with #8301, which removes DatasetKind::Update. Trace the database_kind enum and its conversion paths. Done means the update variant is pruned through the required schema process and unexpected update values produce the stated runtime error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.