oxidecomputer / oxidecomputer/omicron

FM: sitreps should be diffable

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

Nobody has claimed this yet.

fault-management
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

So that this part can stop being "TODO: actually do this part":
https://github.com/oxidecomputer/omicron/blob/1aeba9797e3a2a5ecd45b7b74b48f5bb17a1ea00/nexus/src/app/background/tasks/fm_analysis.rs#L240-L255

One thing that I'm not totally sure how to deal with is that we are representing stuff like closing a case by setting an Optional SitrepUuid closed_sitrep_id field to Some. If we are comparing a sitrep to a previous sitrep, we would certainly want to treat them as "different" if the newer one changes the closed ID to a different sitrep ID. However, if we are diffing two sitreps of the same generation, we might in theory want to treat two sitreps that both close the same case in that sitrep as equivalent: if sitreps A and B are both potential children of sitrep C, and A sets a case's closed_sitrep_id to Some(a_id), and B sets the same case's closed_sitrep_id to Some(b_id), they are making the same change relative to C with regards to that case. In practice, I don't think this is actually that big a deal, since in the code I linked above where we need to diff a sitrep against its parent in order to determine if it's changed at all, we won't be comparing two sitreps with the same parent. But if we have an OMDB command or something that's diffing two different potential children of the same sitrep, we might want to handle that differently. I dunno.

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 in nexus/src/app/background/tasks/fm_analysis.rs at the linked TODO and inspect how sitreps and closed_sitrep_id are represented. Clarify the intended comparison between a sitrep and its parent versus two potential children of the same sitrep. Done means sitrep differences can be determined consistently for the use case described there.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.