Repository navigation
ateletpb: carry the Restore base snapshot as a typed source, dropping golden_snapshot_uri - #1602
Conversation
f78d4cb to
9da9186
Compare
9da9186 to
958f2e9
Compare
fc71f16 to
631bfe5
Compare
Benjamin Elder (BenTheElder)
left a comment
There was a problem hiding this comment.
I think I agree with the agent here, this could be a lot simpler if we leaned into the fact that currently we don't support rolling upgrades on a node.
| // Superseded by base_config. During the transition callers set both and | ||
| // atelet prefers base_config, so ateapi and atelet can roll in either | ||
| // order; removed (and reserved) in a follow-up once both sides have | ||
| // rolled. |
There was a problem hiding this comment.
🤖 should-fix 🟡 – The transition isn't needed. Before 1.0 we don't keep cross-version wire compatibility: a release deploys as a unit (versioned atelet DaemonSet, version-labeled nodes), so a new ateapi never talks to an old atelet, or the other way round.
That means this PR can replace golden_snapshot_uri with base_config outright, and a lot goes away:
- the dual-write on both resume paths in
workflow_resume.go restoreBaseConfig's fallback and the must-agree check invalidateRestoreRequest(cmd/atelet/main.go:1735-1760)- the dual-field assertions in the new functional test
- the follow-up PR to remove and reserve field 12
- the "Must stay field 1" constraint on
ExternalRestoreConfiguration.snapshot_uri
The refactor you're after, a restore-source type with a home for read-side attributes, stays exactly as it is.
There was a problem hiding this comment.
Done, it simplified code by a lot :)
631bfe5 to
8b43887
Compare
RestoreRequest borrowed ExternalCheckpointConfiguration — a write destination — for the snapshot it reads, leaving read-side attributes of a restore source no place to live. Split the restore arm into its own ExternalRestoreConfiguration; the oneof's type change is wire-compatible (snapshot_uri keeps field number 1, and old peers decode the message as before). base_config supersedes golden_snapshot_uri, typing the DATA_ON_GOLDEN base as a restore source too. The old field stays until both components roll — callers set both and atelet prefers base_config — and is removed (and reserved) in a follow-up. Pure restructuring: no caller sets base_config yet, nothing reads it, and the wire bytes of every current request are unchanged.
Move the DATA_ON_GOLDEN base snapshot from RestoreRequest's top-level golden_snapshot_uri string to base_config, a typed restore source: ateapi sets it on both golden-data resume paths (an external data snapshot and a local pause checkpoint combining with the golden) and atelet reads and validates only it. The characteristic test of the ateapi to atelet request pins base_config accordingly.
8b43887 to
e18b9b3
Compare
| reserved 12; | ||
| reserved "golden_snapshot_uri"; |
There was a problem hiding this comment.
🤖 nit 🟢 – Same reasoning as the transition: before 1.0 there's no mixed-version pair to protect, so field 12 doesn't need reserving. base_config could take 12 directly instead of 17, which keeps the numbering dense. Not a blocker either way.
There was a problem hiding this comment.
(we just did a cleanup pass of these)
There was a problem hiding this comment.
There was a problem hiding this comment.
done
e18b9b3 to
e53ad89
Compare
base_config now carries the DATA_ON_GOLDEN base snapshot; nothing sets or reads the old string field. base_config takes its field number, keeping the message's numbering dense.
e53ad89 to
e8c78b0
Compare
1d7ca8c
Refactors the atelet Restore API so the DATA_ON_GOLDEN base snapshot travels as a typed restore source instead of a bare string, preparing for the node-local snapshot cache (#690, #1551):
RestoreRequestgets its own external snapshot source message, and read-side attributes of a restore source have a home — today the URI, next (in the M2 cache work) a sharing property set by the control plane.This change is not backward compatible.
golden_snapshot_uriis removed fromRestoreRequestwith no transition: an ateapi from before this change sends a DATA_ON_GOLDEN restore an updated atelet rejects (nobase_config), and an updated ateapi sends one an old atelet rejects (nogolden_snapshot_uri). ateapi and atelet must be rolled together. Fresh starts, FULL/DATA restores of an actor's own snapshot, and local pause restores without a golden base are unaffected.Three commits, each buildable and tested:
ateletpb: give Restore its own external snapshot source message—ExternalRestoreConfigurationreplacesExternalCheckpointConfigurationinRestoreRequest's config oneof (same wire shape; the checkpoint-side write-destination message is untouched), andbase_configis added for the DATA_ON_GOLDEN base. No behavior change: nothing sets or reads the new field yet.ateapi, atelet: carry the restore base snapshot in base_config— the cutover: ateapi setsbase_configon both golden-data resume paths (external data snapshot, and local pause checkpoint combining with the golden); atelet reads and validates onlybase_config. The characteristic test of the ateapi→atelet request and the golden-data functional test pin the new field.ateletpb: remove golden_snapshot_uri from RestoreRequest— the old field is deleted andbase_configtakes its field number, keeping the numbering dense.Tested: full ateapi + atelet suites including the controlapi functional tests; gofmt, golangci-lint, boilerplate clean.
🤖 Generated with Claude Code