Skip to content

ax-server, e2e: enable workspace pre-warming by default and add shared custom-image E2E - #651

Merged
itssimrank merged 4 commits into
mainfrom
prewarm-and-lifecycle-e2e
Nov 19, 2026
Merged

itssimrank merged 4 commits into
mainfrom
prewarm-and-lifecycle-e2e

Conversation

@itssimrank

Copy link
Copy Markdown
Collaborator

Summary

Enables workspace snapshot pre-warming by default in ax-server and adds end-to-end coverage for workspace pre-warming, explicit suspend/resume, completion, and running a plain custom container image against a shared workspace.

Key Changes

  • cmd/ax-server/main.go: Always wire SetupCoordinator: runnerSrv into WorkspaceManager when --runner-addr is enabled, removing the --enable-prewarm / AX_ENABLE_PREWARM gate.
  • test/e2e/launcher_test.go: Add TestE2E_PrewarmAndCustomImageSharedWorkspace covering:
    1. Applying a Workspace with setup.files + setup.commands and verifying it pre-warms to Ready.
    2. Running Task 1 against the pre-warmed workspace to COMPLETED with Outcome.Output.
    3. Running Task 2 with a plain custom image (AX_E2E_LAUNCHER_IMAGE, runner mounted read-only) on the same workspace through QUEUED → WORKING → SUSPENDED → WORKING → COMPLETED, preserving /workspace across explicit suspend/resume.

Testing

  • go test ./cmd/ax-server/...
  • go test -c -o /dev/null ./test/e2e/...
  • Kind E2E suite (running in PR CI)

Comment thread cmd/ax-server/main.go Resolved

@mayawang mayawang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice coverage, thanks Simran! Heads up this collides with #647: once pre-warm is always on, a Workspace with setup needs profile.image, and every Task needs one too. Your new E2E workspace and task 1 have neither, and neither does hack/hero-demo/workspace.yaml. Probably easiest to let #647 land first, then rebase and add profile.image to those three. @rakyll does that order work for you?

@mayawang

Copy link
Copy Markdown
Collaborator

Update from standup: no need to wait on #647, go ahead and merge this one. @rakyll heads up that #647 will then need profile.image added to the new pre-warm E2E workspace and task 1 here, plus hack/hero-demo/workspace.yaml, when it rebases

@itssimrank
itssimrank merged commit cb867b6 into main Nov 19, 2026
12 checks passed
YoyinZyc added a commit that referenced this pull request Nov 20, 2026
Workspace pre-warming is on by default since #651, so Step 2 of the hero
demo no longer has to be a stub.

- hack/hero-demo: workspace.yaml gets a spec.profile that matches
  task-starter.yaml, so the starter task starts from the workspace's
  snapshot. run.sh waits for the apply, which pre-warms, and passes when
  the workspace reports SnapshotReady. STARTER_IMAGE now applies to both
  manifests.
- ax apply: CreateWorkspace returns only once the workspace is pre-warmed,
  so it gets lifecycleRPCTimeout (5m) instead of the 30s shared by the
  rest of the apply.
- ax-server: drop firstUnimplementedWorkspaceField. It rejected
  spec.profile and spec.setup.gateway until the SetupCoordinator was
  wired, which it now is whenever the runner server is on.
- docs/manifests.md: spec.profile and spec.setup.gateway are available;
  add a section on how pre-warming works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants