Skip to content

Commit a897dd1

Browse files
committed
fix validation CI
Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
1 parent c5a63a5 commit a897dd1

File tree

4 files changed

+36
-14
lines changed

4 files changed

+36
-14
lines changed

.github/actions/kfp-k8s/action.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ inputs:
44
required: true
55
default: "1.2.2"
66
description: "build package version"
7+
generate_golang_proto:
8+
required: true
9+
default: "false"
10+
description: "optionally generate golang proto files"
711
runs:
812
using: "composite"
913
steps:
@@ -18,16 +22,23 @@ runs:
1822
run: |
1923
python -m build .
2024
21-
- name: Generate kfp-kubernetes proto files from source
25+
- name: Generate kfp-kubernetes python proto files from source
2226
id: generate-kfp-kubernetes-proto-files
2327
shell: bash
2428
if: ${{ steps.install-kfp.outcome == 'success' }}
2529
working-directory: ./kubernetes_platform
2630
run: make clean python USE_FIND_LINKS=true
2731

32+
- name: Generate kfp-kubernetes golang proto files from source
33+
id: generate-kfp-kubernetes-go-proto-files
34+
shell: bash
35+
if: ${{ steps.install-kfp.outcome == 'success' && inputs.generate_golang_proto == 'true' }}
36+
working-directory: ./kubernetes_platform
37+
run: make golang
38+
2839
# kfp is installed transitively
2940
# --find-links ensures pip first looks in the sdk/python/dist folder
30-
# outputted from install-kfp step before looking at pypi
41+
# outputted from generate-kfp-kubernetes-proto-files step before looking at pypi
3142
- name: Install kfp & kfp-kubernetes from source
3243
id: install-kfp-kubernetes
3344
shell: bash

.github/actions/protobuf/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ inputs:
1616
required: true
1717
default: "0.42.0"
1818
description: "wheels python package version"
19+
generate_golang_proto:
20+
required: true
21+
default: "false"
22+
description: "optionally generate golang proto files"
1923
runs:
2024
using: "composite"
2125
steps:
@@ -53,6 +57,13 @@ runs:
5357
run: |
5458
pip install api/v2alpha1/python/dist/*.whl
5559
60+
- name: Generate kfp-pipeline-spec golang files
61+
if: ${{ inputs.generate_golang_proto == 'true' }}
62+
working-directory: ./api
63+
shell: bash
64+
run: |
65+
make golang
66+
5667
- name: Summary
5768
shell: bash
5869
run: |

.github/workflows/validate-generated-files.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,18 @@ jobs:
3838
uses: actions/setup-python@v4
3939
with:
4040
python-version: 3.9
41-
42-
- name: Install Dependencies
43-
run: |
44-
sudo apt-get update && sudo apt-get install -y protobuf-compiler jq default-jdk
45-
python3 -m pip install setuptools wheel
4641

47-
- name: Generate API proto files
48-
working-directory: ./api
49-
run: make clean all
50-
51-
- name: Generate kfp-kubernetes proto files from source
52-
working-directory: ./kubernetes_platform
53-
run: make clean all
42+
- name: Install protobuf dependencies & kfp-pipeline-spec
43+
id: install-protobuf-deps
44+
uses: ./.github/actions/protobuf
45+
with:
46+
generate_golang_proto: "true"
47+
48+
- name: Install kfp & kfp-kubernetes from source
49+
id: install-kfp-k8s-deps
50+
uses: ./.github/actions/kfp-k8s
51+
with:
52+
generate_golang_proto: "true"
5453

5554
- name: Generate K8s Native API CRDs
5655
working-directory: ./backend/src/crd/kubernetes

api/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ clean-python:
6060
rm -rf v2alpha1/python/build
6161
rm -rf v2alpha1/python/dist
6262
rm -rf v2alpha1/python/kfp_pipeline_spec.egg-info
63+
rm -rf v2alpha1/google
6364
rm -f v2alpha1/python/kfp/pipeline_spec/pipeline_spec_pb2.py
6465
rm -f v2alpha1/google/rpc/status.proto
6566

0 commit comments

Comments
 (0)