You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
examples/task.yaml gives the task an empty workspace because the Task is listed before its Workspace #450
examples/task.yaml lists the Task before the Workspace it uses. ax apply creates the documents in file order, so the Task is created and reconciled before its Workspace exists. fetchWorkspaces quietly skips references it can't find (internal/server/server.go:364), so the actor template is built without AX_WORKSPACES_YAML.
The runner then sets up an empty /workspace, writes its "initialized" marker, and reports ready. The Workspace created a moment later is never used. Because tasks are immutable, the only way out is to delete the task and apply again with the documents in the other order.
Example, using the same layout as the shipped example (a Task followed by a Workspace with a git entry and a files entry):
$ ax apply -f task.yamltask.ax.io/git-task createdworkspace.ax.io/git-workspace created
$ ax resume task git-task
$ ax describe task git-task... Ready True TaskRunning Task is running and its workspace is ready WorkspaceReady True SetupComplete Workspace setup completed at 10.59.128.81
$ ax ssh git-task -- sh -c 'ls -A /workspace; curl -s $AX_METADATA_URL/metadata/v1alpha1/ax/workspaces'command.logworkspace metadata not available
There's no clone and no file from files, yet the task says the workspace is ready. With the Workspace listed first, the same spec gets its files written and a clone attempted (which then hits #427, but that's a separate problem).
Suggested fix
Reject CreateTask when a referenced Workspace doesn't exist (FailedPrecondition naming the missing workspace), so the mistake is loud instead of silent.
Have ax apply create Workspaces and Models before Tasks, whatever their order in the file.
Put the Workspace first in examples/task.yaml and in the examples in docs/manifests.md.
I am taking this on in two focused steps: first order the shipped example so its Workspace exists before its Task, then reject missing workspace references before saving or provisioning a Task. I will include baseline regression failures, passing controls, and captured CLI/API/runtime evidence. The general suggestion to reorder arbitrary multi-document input in ax apply will remain separately identified.
Fixed: CreateTask rejects a Task whose Workspace doesn't exist (#461); examples/task.yaml is gone.
We are closing this as part of a cleanup after the significant changes in v0.4.0, because it is probably obsolete or out of scope now. If you think this is a mistake, please reopen it (or leave a comment if you can't reopen it).
Activity
erain commentedon Oct 13, 2026
I am taking this on in two focused steps: first order the shipped example so its Workspace exists before its Task, then reject missing workspace references before saving or provisioning a Task. I will include baseline regression failures, passing controls, and captured CLI/API/runtime evidence. The general suggestion to reorder arbitrary multi-document input in ax apply will remain separately identified.
rakyll commentedon Nov 25, 2026
Fixed: CreateTask rejects a Task whose Workspace doesn't exist (#461); examples/task.yaml is gone.
We are closing this as part of a cleanup after the significant changes in v0.4.0, because it is probably obsolete or out of scope now. If you think this is a mistake, please reopen it (or leave a comment if you can't reopen it).