oxidecomputer / oxidecomputer/omicron

store previous release in `target_release` to avoid big scans

Open
#9,115 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Good for new hires
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

There are several places where we want to know both the current release and the previous one:

  • in repo pruning (#9107)
  • in assembling a summary for the console (#8897)
  • in assembling the planning input

It's tempting to just select the last two rows of the target_release table, but that doesn't work because you can set the target release to itself after a MUPdate.

I'm adding a datastore function to do this in #9107 but it requires scanning back a bit, and in principle could have to either scan back really far or else give up. (I'm choosing to have it give up rather than scan unbounded.) But we could avoid all this if every time we set a new target release, we stored the previous distinct one.

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 reviewing the target_release table and the datastore function being added in #9107, then trace the repo-pruning, console-summary, and planning-input uses mentioned here. Done means storing the previous distinct target release whenever a new target release is set, so those consumers do not need potentially unbounded scans.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.