Skip to content

ax: add promote to copy a task to another cluster - #618

Merged
yongruilin merged 2 commits into
google:mainfrom
yongruilin:ax-remote-promote
Nov 17, 2026
Merged

yongruilin merged 2 commits into
google:mainfrom
yongruilin:ax-remote-promote

Conversation

@yongruilin

@yongruilin yongruilin commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Add ax promote task <name> --to <context>: it creates a task that exists on one cluster, with the Gateway and Workspace it binds, on another cluster and resumes it there.

  • The source cluster is only read unless --suspend-source is set, which suspends the task there once the target has created it and before the target resumes it.
  • The target is checked before it is changed, and --preflight-only prints what would change.
  • On the target, an existing Gateway is reused as it is, an existing Workspace must have the same spec, and an existing Task is an error unless --replace.
  • The promoted Task keeps its spec, including spec.sessionId; sandbox files and Secrets are not copied, and a note names the credentials a new Gateway injects.
  • --to names a kube context and is never resolved from AX_SERVER (tunnel.Options.IgnoreEnv).

Follow-up: Kind E2E, then Secret checks and --copy-secrets.

ax promote task <name> --to <context> creates a task, with the Gateway and
Workspace it binds, on another cluster and resumes it there.
Comment thread docs/local_installer.md
- `/tmp/demo-task.yaml` runs unmodified on GKE; `ax suspend` -> `ax resume` round-trips `/workspace/gcs.txt` through GCS (`saved-in-gcs`).
- `ax ctx` displays independent `(Healthy)` background tunnels for both `ax-local` and `$GKE_CTX`, allowing instant context switching without manual `kubectl port-forward` management.

### 5.3 Promote a Local Task to GKE (`ax promote`)

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.

The pr lgtm. I think we could add a detailed user guide or example case about code checkpoint and trajectory continuity. It would be a good reference for user(or their agent) to setup the local to remote pipeline.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Noted, thanks. I will include it in the follow-up PR.

--suspend-source suspends it once the target has created the task and
before the target resumes it, so the task never runs on both.
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.

2 participants