Skip to content

Commit 94184c6

Browse files
committed
Merge remote-tracking branch 'kubeflow/master' into rebase-2.4-master
# Conflicts: # backend/src/v2/cacheutils/cache.go # backend/src/v2/cmd/driver/main.go # backend/src/v2/driver/driver.go
2 parents aee6811 + 65d1d79 commit 94184c6

File tree

19 files changed

+173
-33
lines changed

19 files changed

+173
-33
lines changed

.github/workflows/kfp-sdk-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Set up Python
2525
uses: actions/setup-python@v4
2626
with:
27-
python-version: ${{ matrix.python }}
27+
python-version: ${{ matrix.python-version }}
2828

2929
- name: Run SDK Tests
3030
run: |

backend/src/apiserver/template/v2_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ func (t *V2Spec) RunWorkflow(modelRun *model.Run, options RunWorkflowOptions) (u
299299
if err := protojson.Unmarshal(bytes, spec); err != nil {
300300
return nil, util.NewInternalServerError(err, "Failed to parse pipeline spec")
301301
}
302-
job := &pipelinespec.PipelineJob{PipelineSpec: spec}
302+
job := &pipelinespec.PipelineJob{PipelineSpec: spec, DisplayName: modelRun.DisplayName}
303303
jobRuntimeConfig, err := modelToPipelineJobRuntimeConfig(&modelRun.RuntimeConfig)
304304
if err != nil {
305305
return nil, util.NewInternalServerError(err, "Failed to convert to PipelineJob RuntimeConfig")

backend/src/v2/cmd/driver/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ var (
4646
driverType = flag.String(driverTypeArg, "", "task driver type, one of ROOT_DAG, DAG, CONTAINER")
4747
pipelineName = flag.String("pipeline_name", "", "pipeline context name")
4848
runID = flag.String("run_id", "", "pipeline run uid")
49+
runName = flag.String("run_name", "", "pipeline run name (Kubernetes object name)")
50+
runDisplayName = flag.String("run_display_name", "", "pipeline run display name")
4951
componentSpecJson = flag.String("component", "{}", "component spec")
5052
taskSpecJson = flag.String("task", "", "task spec")
5153
runtimeConfigJson = flag.String("runtime_config", "", "jobruntime config")
@@ -167,6 +169,8 @@ func drive() (err error) {
167169
options := driver.Options{
168170
PipelineName: *pipelineName,
169171
RunID: *runID,
172+
RunName: *runName,
173+
RunDisplayName: *runDisplayName,
170174
Namespace: namespace,
171175
Component: componentSpec,
172176
Task: taskSpec,

backend/src/v2/compiler/argocompiler/argo.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,11 @@ func runID() string {
351351
return "{{workflow.uid}}"
352352
}
353353

354+
func runResourceName() string {
355+
// This translates to the Argo Workflow object name.
356+
return "{{workflow.name}}"
357+
}
358+
354359
func workflowParameter(name string) string {
355360
return fmt.Sprintf("{{workflow.parameters.%s}}", name)
356361
}

backend/src/v2/compiler/argocompiler/container.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ func (c *workflowCompiler) addContainerDriverTemplate() string {
170170
"--type", "CONTAINER",
171171
"--pipeline_name", c.spec.GetPipelineInfo().GetName(),
172172
"--run_id", runID(),
173+
"--run_name", runResourceName(),
174+
"--run_display_name", c.job.DisplayName,
173175
"--dag_execution_id", inputValue(paramParentDagID),
174176
"--component", inputValue(paramComponent),
175177
"--task", inputValue(paramTask),

backend/src/v2/compiler/argocompiler/dag.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,8 @@ func (c *workflowCompiler) addDAGDriverTemplate() string {
564564
"--type", inputValue(paramDriverType),
565565
"--pipeline_name", c.spec.GetPipelineInfo().GetName(),
566566
"--run_id", runID(),
567+
"--run_name", runResourceName(),
568+
"--run_display_name", c.job.DisplayName,
567569
"--dag_execution_id", inputValue(paramParentDagID),
568570
"--component", inputValue(paramComponent),
569571
"--task", inputValue(paramTask),

backend/src/v2/compiler/argocompiler/testdata/create_mount_delete_dynamic_pvc.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ spec:
4747
- my-pipeline
4848
- --run_id
4949
- '{{workflow.uid}}'
50+
- --run_name
51+
- '{{workflow.name}}'
52+
- --run_display_name
53+
- ''
5054
- --dag_execution_id
5155
- '{{inputs.parameters.parent-dag-id}}'
5256
- --component
@@ -302,6 +306,10 @@ spec:
302306
- my-pipeline
303307
- --run_id
304308
- '{{workflow.uid}}'
309+
- --run_name
310+
- '{{workflow.name}}'
311+
- --run_display_name
312+
- ''
305313
- --dag_execution_id
306314
- '{{inputs.parameters.parent-dag-id}}'
307315
- --component

backend/src/v2/compiler/argocompiler/testdata/create_pod_metadata.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ spec:
3535
- namespace/n1/pipeline/hello-world
3636
- --run_id
3737
- '{{workflow.uid}}'
38+
- --run_name
39+
- '{{workflow.name}}'
40+
- --run_display_name
41+
- ''
3842
- --dag_execution_id
3943
- '{{inputs.parameters.parent-dag-id}}'
4044
- --component
@@ -245,6 +249,10 @@ spec:
245249
- namespace/n1/pipeline/hello-world
246250
- --run_id
247251
- '{{workflow.uid}}'
252+
- --run_name
253+
- '{{workflow.name}}'
254+
- --run_display_name
255+
- ''
248256
- --dag_execution_id
249257
- '{{inputs.parameters.parent-dag-id}}'
250258
- --component

backend/src/v2/compiler/argocompiler/testdata/exit_handler.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ spec:
5252
- pipeline-with-exit-handler
5353
- --run_id
5454
- '{{workflow.uid}}'
55+
- --run_name
56+
- '{{workflow.name}}'
57+
- --run_display_name
58+
- ''
5559
- --dag_execution_id
5660
- '{{inputs.parameters.parent-dag-id}}'
5761
- --component
@@ -308,6 +312,10 @@ spec:
308312
- pipeline-with-exit-handler
309313
- --run_id
310314
- '{{workflow.uid}}'
315+
- --run_name
316+
- '{{workflow.name}}'
317+
- --run_display_name
318+
- ''
311319
- --dag_execution_id
312320
- '{{inputs.parameters.parent-dag-id}}'
313321
- --component

backend/src/v2/compiler/argocompiler/testdata/hello_world.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ spec:
3333
- namespace/n1/pipeline/hello-world
3434
- --run_id
3535
- '{{workflow.uid}}'
36+
- --run_name
37+
- '{{workflow.name}}'
38+
- --run_display_name
39+
- ''
3640
- --dag_execution_id
3741
- '{{inputs.parameters.parent-dag-id}}'
3842
- --component
@@ -235,6 +239,10 @@ spec:
235239
- namespace/n1/pipeline/hello-world
236240
- --run_id
237241
- '{{workflow.uid}}'
242+
- --run_name
243+
- '{{workflow.name}}'
244+
- --run_display_name
245+
- ''
238246
- --dag_execution_id
239247
- '{{inputs.parameters.parent-dag-id}}'
240248
- --component

0 commit comments

Comments
 (0)