Repository navigation
api, controller, server: add ForkTask RPC to branch from a parked task's snapshot - #669
Open
aprajitaarora13 wants to merge 1 commit into
Open
aprajitaarora13 wants to merge 1 commit into
aprajitaarora13 wants to merge 1 commit into
Conversation
…k's snapshot # Conflicts: # internal/controller/reconciler.go
Collaborator
|
Thanks Aprajita, this came together super cleanly! Forking from a parked task's snapshot fits keeping Task single-goal. Let's hold #669 and #670 out of v0.4.0-rc.1 and keep Step 3 Turn 2 stubbed for now. Since this adds a new RPC and TaskStatus fields, two things to settle before we land it:
Let's compare this with the same-Task approach on #649 and decide there. |
This was referenced Nov 20, 2026
Member
|
Let's come back to this in v0.5.0. |
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.
Part 1 of #649 (followed by CLI, E2E, and hero-demo wiring in the stacked PR).
Adds the
ForkTaskgRPC method so callers can start a follow-up turn branched from a parked (SUSPENDED,IDLE,COMPLETED, orFAILED) task's durable workspace snapshot without mutating or reopening a terminal task:pkg/apis/v1alpha1/):rpc ForkTask(ForkTaskRequest) returns (Task)toservice AX, withForkTaskRequest(atespace,source_task,name,labels,overrides) andForkOverrides(commands,env,goal,config,session_id).parent_taskandparent_tagonTaskStatusto record lineage and track the snapshot tag owned by the fork.internal/controller/reconciler.go):ForkTagName,CreateForkTag(callsSuspendActorAndWaitForSnapshotbeforeCreateTagso asynchronously parked actors have a completed durable snapshot), andDeleteForkTag.ActorTemplateand seeds the forked actor fromstatus.parent_tagviaEnsureActorFromTag, markingWorkspaceReady=True.status.parent_tagonDeleteTaskafter the forked actor is deleted.internal/server/fork.go):profile,workspace,gateway,debug,env, andsession_id(unless overridden), mergesenvandlabelsoverrides, creates the forked task suspended, and cleans up the tag on target creation race.internal/controller/fork_test.go,internal/server/fork_test.go) and updatespkg/apis/v1alpha1/types_test.go.Verified:
make verify(buf format,buf lint,buf generate,go mod tidy,go fmt,golangci-lint: 0 issues).go test ./...passes.