oxidecomputer / oxidecomputer/omicron
store previous release in `target_release` to avoid big scans
Nobody has claimed this yet.
- 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
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 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