Use SDK Store for launch and refresh#689
Conversation
142a1ea to
e6ee0de
Compare
There was a problem hiding this comment.
Pull request overview
This PR migrates Workshop’s SDK resolution/download flow to the new SDK Store APIs (resolve + download), removing the legacy fake GCS-based store plumbing and updating CLI/tests/docs to reflect the new channel semantics (including default channels and optional branches).
Changes:
- Add SDK Store
resolveanddownloadclients and wire them into launch/refresh SDK planning & retrieval. - Introduce relaxed channel parsing (track/risk/branch optionality) and update tests/docs to match.
- Remove legacy GCS store implementation/tests and adjust spread/GitHub Actions workflows accordingly.
Reviewed changes
Copilot reviewed 203 out of 226 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/main/workshop-connections/task.yaml | Use resolve_branch to materialize .in templates before launch |
| tests/main/workshop-connections/.workshop/ws-user-conns.yaml.in | Add ${TEST_SDK_BRANCH} to channels for branch testing |
| tests/main/workshop-connections/.workshop/ws-user-conns.yaml.new.in | Add ${TEST_SDK_BRANCH} to channels for branch testing |
| tests/main/try-sdks/task.yaml | Rework try-area test to build tarballs locally and write sha/yaml sidecars |
| tests/main/try-sdks/unpacked/1/meta/sdk.yaml | Add unpacked SDK metadata fixture (v1) |
| tests/main/try-sdks/unpacked/1/sdk/hooks/setup-base | Add unpacked SDK hook fixture (v1) |
| tests/main/try-sdks/unpacked/2/meta/sdk.yaml | Add unpacked SDK metadata fixture (v2) |
| tests/main/try-sdks/unpacked/2/sdk/hooks/setup-base | Add unpacked SDK hook fixture (v2) |
| tests/main/stop/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/stop/task.yaml | Resolve .in template at runtime |
| tests/main/start/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/start/task.yaml | Resolve .in template at runtime |
| tests/main/sketch-sdk/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/sketch-sdk/task.yaml | Resolve .in template at runtime |
| tests/main/shell/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/shell/task.yaml | Resolve .in template at runtime |
| tests/main/sdk-info/task.yaml | Update expectations (base→arch column) and resolve .in templates |
| tests/main/sdk-info/header.txt | Remove “SDK Store preview” disclaimer from CHANNELS header |
| tests/main/sdk-info/.workshop/stable.yaml.in | Use simplified channels + ${TEST_SDK_BRANCH} |
| tests/main/sdk-info/.workshop/edge.yaml.in | Use simplified channels + ${TEST_SDK_BRANCH} |
| tests/main/remove/task.yaml | Resolve .in template; adjust sed to remove channels with branch suffix |
| tests/main/remove/.workshop/ws-remove-mount.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/remove-snap/task.yaml | Resolve .in templates before launch |
| tests/main/remove-snap/project-2/.workshop/ws-snap-remove-2.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/remove-snap/project-2/.workshop/ws-snap-remove-2a.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/remount/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/remount/task.yaml | Resolve .in template at runtime |
| tests/main/refresh/task.yaml | Resolve .in templates; append branch-aware channel |
| tests/main/refresh/multi/.workshop/ws-refresh-sdk.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/refresh/multi/.workshop/ws-refresh-snapshots.yaml.in | New template version with ${TEST_SDK_BRANCH} |
| tests/main/refresh/multi/.workshop/ws-refresh-snapshots.yaml | Remove non-template static YAML |
| tests/main/refresh-continue/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/refresh-continue/task.yaml | Resolve .in template at runtime |
| tests/main/refresh-abort/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/refresh-abort/task.yaml | Resolve .in template at runtime |
| tests/main/launch-sdk/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/launch-sdk/task.yaml | Resolve .in template; relax date expectation in output |
| tests/main/launch-multiple/task.yaml | Resolve .in templates before launch |
| tests/main/launch-multiple/.workshop/ws-one.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/launch-multiple/.workshop/ws-two.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/launch-multiple/.workshop/ws-three.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/launch-continue/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/launch-continue/task.yaml | Resolve .in template at runtime |
| tests/main/launch-abort/workshop.setup-fail.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/launch-abort/workshop.mount-broken.yaml | New workshop YAML for mount-broken scenario |
| tests/main/launch-abort/task.yaml | Swap workshop YAML via copy instead of sed-based replacement |
| tests/main/launch-abort/.workshop/test-sdk-mount-broken/sdk.yaml | Adjust SDK yaml fixture for mount-broken |
| tests/main/launch-abort/.workshop/test-sdk-mount-broken/hooks/setup-base | Add hook fixture |
| tests/main/launch-abort/.workshop/test-sdk-mount-broken/hooks/save-state | Add hook fixture |
| tests/main/launch-abort/.workshop/test-sdk-mount-broken/hooks/restore-state | Add hook fixture |
| tests/main/interface-tunnel/task.yaml | Resolve .in template at runtime |
| tests/main/interface-tunnel/.workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-ssh-agent/task.yaml | Resolve .in templates at runtime |
| tests/main/interface-ssh-agent/.workshop/ws-ssh.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-ssh-agent/.workshop/ws-ssh-fail.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-plug-binding/task.yaml | Resolve .in template at runtime |
| tests/main/interface-plug-binding/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channels |
| tests/main/interface-mount/task.yaml | Resolve .in template at runtime |
| tests/main/interface-mount/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-gpu/task.yaml | Resolve .in templates at runtime |
| tests/main/interface-gpu/.workshop/ws-gpu.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-gpu/.workshop/ws-gpu-fail.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-desktop/task.yaml | Resolve .in templates at runtime |
| tests/main/interface-desktop/.workshop/ws-desktop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-desktop/.workshop/ws-desktop-fail.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-camera/task.yaml | Resolve .in templates at runtime |
| tests/main/interface-camera/.workshop/ws-camera.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/interface-camera/.workshop/ws-camera-fail.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/info-sdk-health/task.yaml | Resolve .in template at runtime |
| tests/main/info-sdk-health/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/exec/task.yaml | Resolve .in template at runtime |
| tests/main/exec/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channels |
| tests/main/disconnect/task.yaml | Resolve .in template at runtime; adjust sed to avoid channel mutation |
| tests/main/disconnect/workshop.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/connections/task.yaml | Resolve .in templates at runtime |
| tests/main/connections/.workshop/ws-conns-1.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/connections/.workshop/ws-conns-2.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/connect/task.yaml | Resolve .in template at runtime |
| tests/main/connect/workshop.yaml.in | Replace static YAML with template using ${TEST_SDK_BRANCH} |
| tests/main/connect/workshop.yaml | Remove non-template static YAML |
| tests/main/completion/task.yaml | Resolve .in template at runtime |
| tests/main/completion/.workshop/ws-comp.yaml.in | Add ${TEST_SDK_BRANCH} to channels |
| tests/main/check-health/task.yaml | Resolve .in templates at runtime |
| tests/main/check-health/.workshop/ws-ok.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/check-health/.workshop/ws-error.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/check-health/.workshop/ws-waiting.yaml.in | Add ${TEST_SDK_BRANCH} to channel |
| tests/main/autostart/task.yaml | Remove fake store restart step |
| tests/lib/utils.sh | Remove fake GCS store helpers; add resolve_branch; enable workshop.debug |
| tests/lib/sdk/test-sdk-basic/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields (version/platforms) |
| tests/lib/sdk/test-sdk-basic/latest/stable/hooks/setup-base | Add minimal hook |
| tests/lib/sdk/test-sdk-basic/latest/edge/sdkcraft.yaml | Update SDKcraft definition fields (version/platforms) |
| tests/lib/sdk/test-sdk-basic/latest/edge/hooks/setup-base | Add minimal hook (v2) |
| tests/lib/sdk/test-sdk-mount/latest/stable/sdkcraft.yaml | Update SDKcraft definition; adjust mount source path |
| tests/lib/sdk/test-sdk-mount/latest/stable/sdk/hooks/setup-base | Remove old hook path |
| tests/lib/sdk/test-sdk-mount/latest/stable/hooks/setup-base | Add minimal hook |
| tests/lib/sdk/test-sdk-mount/latest/edge/sdkcraft.yaml | Update SDKcraft definition; adjust mount source path |
| tests/lib/sdk/test-sdk-mount/latest/edge/meta/sdk.yaml | Remove old meta yaml fixture |
| tests/lib/sdk/test-sdk-mount/latest/edge/hooks/setup-base | Add minimal hook |
| tests/lib/sdk/test-sdk-info/latest/stable/sdkcraft.yaml | Add new sdkcraft.yaml for test-sdk-info stable |
| tests/lib/sdk/test-sdk-info/latest/stable/meta/sdk.yaml | Remove old meta yaml fixture |
| tests/lib/sdk/test-sdk-info/latest/stable/hooks/setup-base | Add hook fixture |
| tests/lib/sdk/test-sdk-info/latest/edge/sdkcraft.yaml | Add new sdkcraft.yaml for test-sdk-info edge |
| tests/lib/sdk/test-sdk-info/latest/edge/meta/sdk.yaml | Remove old meta yaml fixture |
| tests/lib/sdk/test-sdk-info/latest/edge/hooks/setup-base | Add hook fixture |
| tests/lib/sdk/test-sdk-health-ok/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-health-ok/latest/stable/hooks/setup-base | Add hook fixture |
| tests/lib/sdk/test-sdk-health-ok/latest/stable/hooks/check-health | Add health hook fixture |
| tests/lib/sdk/test-sdk-health-error/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-health-error/latest/stable/hooks/setup-base | Add hook fixture |
| tests/lib/sdk/test-sdk-health-error/latest/stable/hooks/check-health | Add health hook fixture |
| tests/lib/sdk/test-sdk-health-waiting/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-health-waiting/latest/stable/hooks/setup-base | Add hook fixture |
| tests/lib/sdk/test-sdk-health-waiting/latest/stable/hooks/check-health | Add health hook fixture with retry behavior |
| tests/lib/sdk/test-sdk-desktop/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-desktop/latest/stable/hooks/setup-base | Add minimal hook |
| tests/lib/sdk/test-sdk-camera/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-gpu/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-multiple-plugs/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-multiple-plugs/latest/stable/hooks/setup-base | Add minimal hook |
| tests/lib/sdk/test-sdk-ssh-agent/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-ssh-agent/latest/stable/hooks/setup-base | Add minimal hook |
| tests/lib/sdk/test-sdk-tunnel/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-setup-fail/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-setup-fail/latest/stable/hooks/setup-base | Add failing hook fixture |
| tests/lib/sdk/test-sdk-environment/latest/stable/sdkcraft.yaml | Update SDKcraft definition fields |
| tests/lib/sdk/test-sdk-environment/latest/stable/hooks/setup-base | Add env setup hook fixture |
| tests/lib/sdk/test-sdk-go///sdk/hooks/setup-base | Remove Go install from setup-base fixtures |
| tests/lib/sdk/test-sdk-go///meta/sdk.yaml | Remove old meta yaml fixtures |
| tests/integration/gcs-store/task.yaml | Remove legacy GCS store integration suite |
| tests/docs-tutorial/part-1/task.yaml | Reduce storage size; append channel: edge during refresh |
| tests/docs-tutorial/part-1/workshop-part-1.yaml | Remove explicit ollama channel |
| tests/docs-tutorial/part-2/task.yaml | Reduce storage size; remove explicit jupyter channel in appended YAML |
| tests/docs-tutorial/part-2/workshop-part-2.yaml | Remove explicit ollama channel |
| tests/docs-tutorial/part-3/task.yaml | Reduce storage size |
| tests/docs-tutorial/part-3/workshop-part-3.yaml | Remove explicit channels for ollama/jupyter |
| tests/docs-tutorial/part-4/task.yaml | Reduce default storage size |
| tests/docs-how-to/git/workshop.yaml | Update go channel example to 1.26 |
| tests/docs-how-to/debug-issues/workshop.yaml | Update go channel example to edge |
| tests/docs-how-to/connect-vscode/workshop.yaml | Remove explicit vscode-remote channel |
| snap/local/commands/run_daemon | Export WORKSHOP_DEBUG env; remove legacy GCS env |
| internal/workshop/workshop_file.go | Validate channels via sdk.ParseChannel; allow empty channels |
| internal/workshop/workshop_file_test.go | Update fixture expectations for omitted/simplified channels |
| internal/workshop/fakebackend/backend.go | Change ImportSdk behavior (see review comments) |
| internal/timeutil/utc.go | Relax UTC parsing (retry by appending Z) |
| internal/sdkstore/transport/resolve.go | New typed transport structs for resolve API |
| internal/sdkstore/transport/error.go | Omit-zero extra field in API errors |
| internal/sdkstore/resolve.go | Add resolve client |
| internal/sdkstore/resolve_test.go | Add unit tests for resolve client/payload parsing |
| internal/sdkstore/resolve_integration_test.go | Add integration tests for resolve endpoint |
| internal/sdkstore/download.go | Add SDK archive download client with hash/size verification |
| internal/sdkstore/download_test.go | Add unit tests for download client behavior |
| internal/sdkstore/download_integration_test.go | Add integration tests for download endpoint |
| internal/sdkstore/client.go | Wire resolve + download clients into store client |
| internal/sdkstore/test-sdk-info*.json | Update stored store fixtures (publisher/channel map timestamps) |
| internal/sdkstore/test-resolve-*.json | Add resolve response fixtures |
| internal/sdkstore/info_integration_test.go | Remove unused embed import |
| internal/sdkstore/find_integration_test.go | Remove unused embed import |
| internal/sdk/system/system.go | Change system SDK retrieval to write into provided file |
| internal/sdk/system/system_test.go | Update tests for new system retrieval signature |
| internal/sdk/store.go | Expand Store interface to include Resolve/Download; remove legacy GCS store types |
| internal/sdk/channel.go | New channel parsing with optional track/risk/branch + defaults |
| internal/overlord/workshopstate/manifest.go | Switch launch/refresh manifest planning to Store resolve API |
| internal/overlord/workshopstate/manifest_test.go | Update tests to use Store resolve fake + new error aggregation |
| internal/overlord/workshopstate/request.go | Adjust refresh planning criteria (no channel compare) |
| internal/overlord/sdkstate/manager.go | Normalize reported channels using sdk.Channel.Full() |
| internal/overlord/sdkstate/handlers.go | Implement retrieval via Store Download + tar extraction of meta/sdk.yaml |
| internal/overlord/sdkstate/handlers_test.go | Update tests for new retrieval path and yaml caching |
| internal/overlord/overlord.go | Remove GCS store initialization |
| internal/gcsstore/* | Remove legacy GCS store implementation + tests |
| internal/daemon/api_test.go | Remove GCS store wiring; adjust system SDK retrieval mocking |
| internal/daemon/api_sdks_test.go | Update test fixtures for channel track/risk fields |
| go.mod | Add direct dependency on github.com/google/uuid |
| cmd/sdk/info.go | Remove “SDK Store preview” disclaimer from output |
| cmd/sdk/info_test.go | Update golden output for CHANNELS header |
| docs/tutorial/part-1-get-started.rst | Update snap install flags; update channel examples and output snippets |
| docs/tutorial/part-2-work-with-interfaces.rst | Remove explicit channels in tutorial YAML examples |
| docs/tutorial/part-3-sketch-sdks.rst | Remove explicit channels in tutorial YAML example |
| docs/tutorial/part-4-craft-sdks.rst | Update snap install invocation for sdkcraft edge |
| docs/reference/sdks.rst | Document optional branches in channel model |
| docs/reference/definition-files/workshop-definition.rst | Update channel format description (but still says required) |
| docs/reference/definition-files/schema.json | Update schema regex/error message for channels |
| docs/readme.rst | Update edge install command and remove explicit channel in example YAML |
| docs/how-to/fix-workshops/resolve-plug-conflicts.rst | Remove explicit channels in examples; adjust emphasize lines |
| docs/how-to/fix-workshops/debug-issues.rst | Update channel examples/output snippet for edge |
| docs/how-to/develop-with-workshops/use-workshops-with-ai-agents.rst | Remove explicit all/edge channels in example |
| docs/how-to/develop-with-workshops/use-git.rst | Update go channel examples to 1.26 |
| docs/how-to/develop-with-workshops/run-vscode-in-browser.rst | Remove explicit channel; adjust emphasize lines |
| docs/how-to/develop-with-workshops/run-jupyterlab-in-browser.rst | Remove explicit channel; adjust emphasize lines |
| docs/how-to/develop-with-workshops/run-github-actions-locally.rst | Remove explicit channel; adjust emphasize lines |
| docs/how-to/develop-with-workshops/connect-vscode.rst | Remove explicit channel; adjust emphasize lines |
| docs/how-to/customize-workshops/use-multiple-workshops.rst | Update node/go channel examples to simplified tracks |
| docs/how-to/customize-workshops/move-projects.rst | Update go channel example |
| docs/how-to/customize-workshops/forward-ports.rst | Remove explicit channel in example |
| docs/how-to/customize-workshops/add-actions.rst | Update go channel example |
| docs/explanation/workshops/concepts.rst | Update go channel example; adjust interface example text/lines |
| docs/explanation/sdks/sdk-vs-dockerfile.rst | Remove explicit channel in example |
| docs/doc-style-guide.md | Update examples/emphasize lines for simplified channels |
| docs/contributing.rst | Remove local fake GCS store how-to |
| docs/coding-style-guide.md | Update example channel to latest/stable |
| docs/.custom_wordlist.txt | Remove gcs word |
| .workshop/tools/hooks/setup-base | Remove fake-gcs-server install step |
| .workshop/tools/hooks/check-health | Remove fake-gcs-server health check |
| .workshop/dev.yaml | Remove fake-store action |
| .spread.yaml | Replace fake store envs with TEST_SDK_BRANCH; add journald logs on failure; adjust timeouts |
| .github/workflows/zizmor.yaml | Disable online audits (TODO noted) |
| .github/workflows/spread.yaml | Add SDKCRAFT_STORE_CREDENTIALS secret plumb-through |
| .github/workflows/lxd-candidate-check.yaml | Add staging credentials secret plumb-through |
| .github/workflows/cover.yaml | Add staging credentials secret plumb-through |
| .github/workflows/build-deps.yaml | Add SDK change detection + test SDK build/release jobs |
e6ee0de to
ba27c54
Compare
64f19a2 to
19e4c02
Compare
dmitry-lyfar
left a comment
There was a problem hiding this comment.
Great job! I left some comments but these are mostly minor.
a7f57e1 to
d9ab735
Compare
|
I rebased on main and condensed down to 4 fixup commits; the first 2 address the same issue as #700. The 3rd Artem has already reviewed. The 4th looks to still have at least one remaining bug |
5cdc7bc to
71abc7b
Compare
|
down to 3 fixups now, but there are some subsequent standalone commits as well |
85c5e62 to
cc46e52
Compare
This is intended as a temporary fix while the Store team adds the required timezones. If it becomes a longer-term solution, we should probably split it into another type to avoid being too lenient about the input we accept.
I left out tests for now, since the Store API hasn't been finalised yet. When it is, we can follow the same pattern as the find and info tests.
Co-authored-by: Dmitry Lyfar <69887876+dmitry-lyfar@users.noreply.github.com>
cc46e52 to
dfe36f9
Compare
Description
sdk info; it now reflects SDKs that are available to usesnapd). Store SDKs can omit the channel, track or risk (the default islatest/stable)timeutil.TimeUTCparsing even further; if there's no timezone we assume UTC. I want to remove this when the Store gets better at applying timezones consistentlyTangentially related changes:
workshop.debugoption to the snap (controls log level)Some caveats:
meta/sdk.yamlfrom SDK tarballs instead of taking it from the Store. The resolve endpoint doesn't include this currently. In any case the Store potentially corrupts it by storing it as JSON rather than YAMLsdkcraft upload. It's not really in the scope of this PR but I think we should do it soon.os.Fileso the fake backend can find it. Normally I would treat this as a sign that the API needs improving, but in this case I think it's actually a nice API, we just need an extra hack to accommodate the existing hack of not using tarballs in the fake backend.Self-review quick check
Docs
Procedure:
Content:
tutorial/andhow-to/sections).docs/.coverage.yamlupdated, coverage tags added (.. artefact).Or: