Skip to content

Commit 3a61807

Browse files
Merge pull request #154 from mprahl/cherry-pick-pipeline-empty-input
Cherry pick Kubernetes resource input parameterization and handling empty optional pipeline inputs
2 parents 522e4c6 + 214a22d commit 3a61807

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+3786
-646
lines changed

.github/workflows/kfp-samples.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,35 @@ jobs:
3131
with:
3232
python-version: 3.9
3333

34+
- name: apt-get update
35+
run: sudo apt-get update
36+
37+
- name: Install protobuf-compiler
38+
run: sudo apt-get install protobuf-compiler -y
39+
40+
- name: Install setuptools
41+
run: |
42+
pip3 install setuptools
43+
pip3 freeze
44+
45+
- name: Install Wheel
46+
run: pip3 install wheel==0.42.0
47+
48+
- name: Install protobuf
49+
run: pip3 install protobuf==4.25.3
50+
51+
- name: Generate API proto files
52+
working-directory: ./api
53+
run: make python
54+
55+
- name: Install kfp-pipeline-spec from source
56+
run: |
57+
python3 -m pip install api/v2alpha1/python
58+
59+
- name: Generate, Build, and Install Kubernetes API proto files & packages
60+
working-directory: ./kubernetes_platform
61+
run: make python && pip install python/dist/*.whl
62+
3463
- name: Create KFP cluster
3564
uses: ./.github/actions/kfp-cluster
3665
with:
@@ -65,4 +94,3 @@ jobs:
6594
with:
6695
name: kfp-samples-tests-artifacts-k8s-${{ matrix.k8s_version }}
6796
path: /tmp/tmp*/*
68-

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@ func Compile(jobArg *pipelinespec.PipelineJob, kubernetesSpecArg *pipelinespec.S
7272
specParams := spec.GetRoot().GetInputDefinitions().GetParameters()
7373
for name, param := range specParams {
7474
_, ok := job.RuntimeConfig.ParameterValues[name]
75-
if !ok && param.GetDefaultValue() != nil {
76-
job.RuntimeConfig.ParameterValues[name] = param.GetDefaultValue()
75+
if !ok {
76+
if param.GetDefaultValue() != nil {
77+
job.RuntimeConfig.ParameterValues[name] = param.GetDefaultValue()
78+
} else if param.IsOptional {
79+
job.RuntimeConfig.ParameterValues[name] = structpb.NewNullValue()
80+
}
7781
}
7882
}
7983

0 commit comments

Comments
 (0)