Skip to content

Commit ccd0c33

Browse files
authored
chore: switch to using git-cliff instead of changelog and test for kfp-server codegen (#12113)
* switch to git-cliff instead of changelog Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> * test for kfp-server-api codegen in ci Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> --------- Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
1 parent 00c95e9 commit ccd0c33

File tree

10 files changed

+57
-2365
lines changed

10 files changed

+57
-2365
lines changed

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
working-directory: ./backend/src/crd/kubernetes
5656
run: make generate manifests
5757

58-
- name: Generate backend proto code v1beta1
58+
- name: Generate backend proto code v2beta1
5959
working-directory: ./backend/api
6060
env:
6161
API_VERSION: v2beta1
@@ -67,6 +67,18 @@ jobs:
6767
API_VERSION: v1beta1
6868
run: make generate
6969

70+
- name: Generate backend proto code v2beta1
71+
working-directory: ./backend/api
72+
env:
73+
API_VERSION: v2beta1
74+
run: make generate-kfp-server-api-package
75+
76+
- name: Generate backend proto code v1beta1
77+
working-directory: ./backend/api
78+
env:
79+
API_VERSION: v1beta1
80+
run: make generate-kfp-server-api-package
81+
7082
- name: Check for Changes
7183
run: make check-diff
7284

backend/api/Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ API_VERSION ?= v2beta1
2222

2323
# Keep in sync with the version used in test/release/Dockerfile.release
2424
PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.2
25-
25+
RELEASE_IMAGE=ghcr.io/kubeflow/kfp-release:1.2.1
2626
CONTAINER_ENGINE ?= docker
2727

2828
# Generate clients using a pre-built api-generator image.
@@ -34,6 +34,17 @@ generate: fetch-dependencies hack/generator.sh $(API_VERSION)/*.proto
3434
--mount type=bind,source="$$(pwd)/../..",target=/go/src/github.com/kubeflow/pipelines \
3535
$(PREBUILT_REMOTE_IMAGE) /go/src/github.com/kubeflow/pipelines/backend/api/hack/generator.sh
3636

37+
# Use the release image since it has some additional dependencies
38+
# required by kfp-pipeline-ser generation
39+
.PHONY: generate-kfp-server-api-package
40+
generate-kfp-server-api-package:
41+
${CONTAINER_ENGINE} run --interactive --rm \
42+
-e API_VERSION=$(API_VERSION) \
43+
--user $$(id -u):$$(id -g) \
44+
--mount type=bind,source="$$(pwd)/../..",target=/go/src/github.com/kubeflow/pipelines \
45+
$(RELEASE_IMAGE) /go/src/github.com/kubeflow/pipelines/backend/api/build_kfp_server_api_python_package.sh
46+
47+
3748
# Fetch dependency proto
3849
.PHONY: fetch-dependencies
3950
fetch-dependencies: v2beta1/google/rpc/status.proto

cliff.toml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[changelog]
2+
header = "Changelog"
3+
body = """
4+
5+
## {{ version | trim_start_matches(pat="v") }} ({{ timestamp | date(format="%Y-%m-%d") }})
6+
{% for group, commits in commits | group_by(attribute="group") %}
7+
### {{ group | upper_first }}
8+
{% for commit in commits %}
9+
- {% if commit.scope %}**{{ commit.scope }}** {% endif %}{{ commit.message }}{% endfor %}{% endfor %}
10+
"""
11+
trim = true
12+
postprocessors = [{ pattern = "\\(#([0-9]+)\\)", replace = "([#${1}](https://github.com/kubeflow/pipelines/pull/${1}))"}]
13+
14+
[git]
15+
commit_parsers = [
16+
{ message = "^feat", group = "Features"},
17+
{ message = "^fix", group = "Bug Fixes"},
18+
{ message = "^doc", group = "Documentation"},
19+
{ message = "^perf", group = "Other"},
20+
{ message = "^refactor", group = "Other"},
21+
{ message = "^style", group = "Other"},
22+
{ message = "^test", group = "Other"},
23+
{ message = "^chore", group = "Other"},
24+
]

0 commit comments

Comments
 (0)