Rely on waitready service and LXD events to wait for workshop start - #1018
Merged
Conversation
In the past this was used to call `state.Warnf`; it's likely to continue being useful for that in future.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The CI storage command targets a profile Workshop instances do not inherit, and the legacy-format rejection lacks coverage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Reworks workshop startup to use the waitready service and LXD lifecycle events.
Changes:
- Waits for LXD Ready events and cleans up failed starts.
- Rejects manual starts of legacy-format workshops.
- Updates integration infrastructure and attempts to enlarge CI disks.
File summaries
| File | Description |
|---|---|
.github/workflows/spread.yaml |
Changes the CI disk-sizing command. |
internal/daemon/api_connections.go |
Locks state around workshop lookup. |
internal/interfaces/lxd_device/tests/integration/backend_test.go |
Enables waitready in integration tests. |
internal/overlord/workshopstate/manager.go |
Clarifies locking requirements. |
internal/overlord/workshopstate/request.go |
Rejects legacy starts and centralizes lookup. |
internal/waitready/waitready.go |
Makes timeout test-configurable. |
internal/workshop/lxd/lxd_backend.go |
Implements event-driven startup readiness. |
internal/workshop/lxd/start_command.sh |
Removes the obsolete startup script. |
internal/workshop/lxd/tests/helper/helper.go |
Adds test-binary waitready support. |
internal/workshop/lxd/tests/integration/project_test.go |
Configures integration TestMain. |
internal/workshop/lxd/tests/integration/snapshot-format.yaml |
Updates cloud-config hashes. |
internal/workshop/lxd/tests/integration/snapshot_test.go |
Uses the mounted test executable. |
internal/workshop/lxd/tests/integration/workshop_exec_test.go |
Uses shared test devices. |
internal/workshop/lxd/tests/integration/workshop_test.go |
Tests readiness timeout cleanup. |
tests/main/start/task.yaml |
Removes redundant LXD readiness polling. |
Review details
- Files reviewed: 15/15 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dmitry-lyfar
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Splits out the workshop start logic from #911. The only change there is the cloud-config hashes (from rebasing on main).
Also:
WorkshopManager.WorkshopandWorkshopManager.Workshops. This came from an attempt to callState.Warnfwhenever we load an old workshop. I didn't end up taking that route, so theStatedoesn't currently need to be locked when calling these, but it's useful to keep that requirement since more warnings are likely to appear here.refreshonly works for workshops that are already running. Butlxc startshould also work fine, it just doesn't wait long enough.Self-review quick check
Docs
Procedure:
Content:
tutorial/andhow-to/sections).docs/.coverage.yamlupdated, coverage tags added (.. artefact).Or: