Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,477 changes: 915 additions & 562 deletions api/v1/api.gen.go

Large diffs are not rendered by default.

167 changes: 167 additions & 0 deletions api/v1/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,164 @@ paths:
schema:
$ref: "#/components/schemas/Error"

/dag-runs/{name}/{dagRunId}/edit-retry/preview:
post:
summary: "Preview edited DAG-run retry"
description: "Validates an edited DAG definition against a previous DAG-run and returns the default step skip selection."
operationId: "previewEditRetryDAGRun"
tags:
- "dag-runs"
parameters:
- $ref: "#/components/parameters/RemoteNode"
- $ref: "#/components/parameters/DAGName"
- $ref: "#/components/parameters/DAGRunId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
spec:
type: string
description: "Edited DAG specification in YAML format."
dagName:
type: string
description: "Optional DAG name override for the edited retry run."
required:
- spec
responses:
"200":
description: "Successfully previewed the edited retry"
content:
application/json:
schema:
type: object
properties:
dagName:
type: string
description: "Resolved DAG name for the edited retry."
skippedSteps:
type: array
description: "Default steps selected to be skipped."
items:
type: string
runnableSteps:
type: array
description: "Steps that will be started if not skipped."
items:
type: string
steps:
type: array
description: "Resolved edited DAG steps in execution order for preview rendering."
items:
$ref: "#/components/schemas/Step"
ineligibleSteps:
type: array
description: "Previous completed steps that cannot be skipped with the edited specification."
items:
type: object
properties:
stepName:
type: string
reason:
type: string
required:
- stepName
- reason
errors:
type: array
description: "Validation errors that must be fixed before launching."
items:
type: string
warnings:
type: array
description: "Non-blocking warnings for the edited retry."
items:
type: string
required:
- dagName
- skippedSteps
- runnableSteps
- steps
- ineligibleSteps
- errors
- warnings
default:
description: "Generic error response"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

/dag-runs/{name}/{dagRunId}/edit-retry:
post:
summary: "Run edited DAG retry"
description: "Creates a new DAG-run from an edited DAG definition while preserving outputs from selected skipped steps."
operationId: "editRetryDAGRun"
tags:
- "dag-runs"
parameters:
- $ref: "#/components/parameters/RemoteNode"
- $ref: "#/components/parameters/DAGName"
- $ref: "#/components/parameters/DAGRunId"
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
spec:
type: string
description: "Edited DAG specification in YAML format."
dagRunId:
allOf:
- $ref: "#/components/schemas/DAGRunCreateId"
- description: "Explicit run ID for the new DAG-run; if omitted a new ID is generated."
Comment thread
yohamta0 marked this conversation as resolved.
dagName:
type: string
description: "Optional DAG name override for the edited retry run."
skipSteps:
type: array
description: "Steps to mark skipped while preserving their previous output variables."
items:
type: string
required:
- spec
responses:
"200":
description: "Successfully launched edited retry"
content:
application/json:
schema:
type: object
properties:
dagRunId:
$ref: "#/components/schemas/DAGRunId"
queued:
type: boolean
description: "Indicates whether the run was queued instead of starting immediately."
skippedSteps:
type: array
items:
type: string
startedSteps:
type: array
items:
type: string
required:
- dagRunId
- queued
- skippedSteps
- startedSteps
default:
description: "Generic error response"
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

/dag-runs/{name}/{dagRunId}/sub-dag-runs:
get:
summary: "Get sub DAG runs with timing info"
Expand Down Expand Up @@ -7637,6 +7795,15 @@ components:
example: "latest"
pattern: "^[a-zA-Z0-9_-]+$"

DAGRunCreateId:
type: string
description: "Unique identifier for a newly-created DAG-run. The special value 'latest' is not allowed."
example: "20240101_120000"
pattern: "^[a-zA-Z0-9_-]+$"
not:
enum:
- latest

HealthResponse:
type: object
description: "Response object for the health check endpoint"
Expand Down
5 changes: 5 additions & 0 deletions internal/cmd/params_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ func TestValidateStartPositionalParamCount(t *testing.T) {
cliArgs: []string{"--params", "KEY1=value1 KEY2=value2", "dag.yaml"},
defaultArgs: `p1 p2`,
},
{
name: "NamedDefaultsWithNamedParamsDoNotTriggerPositionalValidation",
cliArgs: []string{"--params", "KEY1=value1 KEY2=value2", "dag.yaml"},
defaultArgs: `KEY1=default1 KEY2=default2`,
},
{
name: "JSONAfterDashSkipsPositionalValidation",
cliArgs: []string{"dag.yaml", "--", `{"REGION":"us-east","VERSION":"2.0"}`},
Expand Down
18 changes: 0 additions & 18 deletions internal/cmd/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,24 +221,6 @@ steps:
})
}

func TestCmdStart_NamedParamsIgnorePositionalCount(t *testing.T) {
t.Parallel()

th := test.SetupCommand(t)

dagFile := th.CreateDAGFile(t, "test-named-params.yaml", `
params: KEY1=default1 KEY2=default2
steps:
- name: step1
command: echo $KEY1 $KEY2
`)

err := th.RunCommandWithError(t, cmd.Start(), test.CmdTest{
Args: []string{"start", "--params", "KEY1=value1 KEY2=value2", dagFile},
})
require.NoError(t, err)
}

func TestCmdStart_FromRunID(t *testing.T) {
t.Run("ReschedulesWithStoredParameters", func(t *testing.T) {
t.Parallel()
Expand Down
1 change: 1 addition & 0 deletions internal/core/exec/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Node struct {
RetryCount int `json:"retryCount,omitempty"`
DoneCount int `json:"doneCount,omitempty"`
Repeated bool `json:"repeated,omitempty"` // indicates if the node has been repeated
SkippedByRetry bool `json:"skippedByRetry,omitempty"`
Error string `json:"error,omitempty"`
SubRuns []SubDAGRun `json:"children,omitempty"`
SubRunsRepeated []SubDAGRun `json:"childrenRepeated,omitempty"` // repeated sub DAG runs
Expand Down
Loading