typed generation numbers via oxide-generation - #11129
Conversation
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
| pub use oxide_generation::{ | ||
| Generation, GenerationNegativeError, GenerationOverflowError, | ||
| }; |
There was a problem hiding this comment.
These are temporary re-exports -- planning to switch the code to using oxide-generation directly.
Created using spr 1.3.6-beta.1
|
Want to make a few more changes to this. |
Created using spr 1.3.6-beta.1
| name = "syn" | ||
| version = "3.0.3" |
There was a problem hiding this comment.
this is fine, but kinda a bummer to have both syn 3 and syn 2 in the workspace at once. I think we're getting pulled forward because of the daft upgrade?
There was a problem hiding this comment.
Yeah, someone's gotta be the first :)
| ] | ||
| }, | ||
| "SagaReassignmentGeneration": { | ||
| "description": "Generation numbers stored in the database, used for optimistic concurrency control", |
There was a problem hiding this comment.
Technically this generation number isn't getting stored in the database, it's an in-memory signal that we've caught up with recovery, but whatever. I don't know if we care enough to change this description.
There was a problem hiding this comment.
Yeah I kept the doc comment for Generation the same to avoid an unnecessary rev of OpenAPI documents. Agreed that generation numbers are used in broader contexts than just database concurrency.
Created using spr 1.3.6-beta.1
Following up from #11129, use omicron-generation-kinds as the place to get `Generation` from. Use omicron-generation-kinds rather than oxide-generation directly to ensure the correct features all get enabled whenever the dep is used. This allows oxide-generation to be dropped from the workspace hack (since all dependencies resolve to the same set of features).
As demoed at the update watercooler yesterday (2026-08-20) -- add the oxide-generation crate and a registry of kinds, very similar to omicron-uuid-kinds.
Also port a few generation kinds over. All of our great typify automatic replacement infrastructure works very well.