runtime: restore from metadata snapshot
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: 'Restore Worker without backend profile fetch'
|
||||
state: 'inprogress'
|
||||
state: 'done'
|
||||
created_at: '2026-07-13T14:44:12Z'
|
||||
updated_at: '2026-07-13T14:45:04Z'
|
||||
updated_at: '2026-07-13T14:55:17Z'
|
||||
assignee: null
|
||||
queued_by: 'yoi ticket'
|
||||
queued_at: '2026-07-13T14:45:04Z'
|
||||
|
||||
@@ -39,4 +39,42 @@ Ticket を `yoi ticket` が queued にしました。
|
||||
State changed to `inprogress`.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: hare at: 2026-07-13T14:55:17Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Changed active Worker restore so it does not fetch backend profile source archives.
|
||||
|
||||
Root cause:
|
||||
- Worker metadata already contains the resolved manifest snapshot used by `Worker::restore_from_worker_metadata_with_context`.
|
||||
- `ProfileRuntimeWorkerFactory::restore_controller` still resolved `request.profile_source` before calling restore, so Runtime restart could fail if workspace-server/backend resource endpoint was not available yet.
|
||||
|
||||
Changes:
|
||||
- Active restore now builds only a minimal builtin fallback manifest/loader and calls `Worker::restore_from_worker_metadata_with_context` directly.
|
||||
- The metadata `resolved_manifest_snapshot` remains the restore authority.
|
||||
- Backend profile source archive resolution is deferred to the pending/no-history fallback path only, where fresh Worker recreation still needs a manifest.
|
||||
|
||||
Validation:
|
||||
- `cargo fmt`
|
||||
- `cargo check -q`
|
||||
- `cargo test -q -p worker-runtime --features fs-store,ws-server`
|
||||
- `cargo test -q -p yoi-workspace-server`
|
||||
- `cd web/workspace && deno task check && deno task test`
|
||||
- `git diff --check`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Note: README.md had pre-existing unrelated local modifications and was not included.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: "yoi ticket" at: 2026-07-13T14:55:17Z from: inprogress to: done reason: cli_state field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
State changed to `done`.
|
||||
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user