Skip to content

Commit 794f286

Browse files
authored
chore: release 2.14.6 (#12355)
* chore: add publish package workflow (#12344) Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> (cherry picked from commit 08ff96b) * chore: regenerate files for ver upgrade (#12341) Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> (cherry picked from commit f689e86) * chore: update versioning policy (#12342) Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> (cherry picked from commit d0e85fa) * chore: remove pin on protobuf 6 ver (#12345) * remove pin on protobuf 6 ver Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> * use requirements.in for kfp-k8s and spec Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> --------- Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> (cherry picked from commit 06e6a44) * test for kfp-server-api codegen in ci Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> (cherry picked from commit b23aac8) * chore: Release 2.14.6 Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> * build wheels from sdist Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> * revert click version change Pin click on 8.1.8. Due to compatibility issues, cli tests fail on click>8.1.8 in Python >= 3.13. Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> --------- Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
1 parent 360bd09 commit 794f286

File tree

33 files changed

+324
-53
lines changed

33 files changed

+324
-53
lines changed
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
name: Publish Python Packages
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
tag:
6+
type: string
7+
required: true
8+
description: "Tag associated with the release (e.g.: 2.14.0)"
9+
packages:
10+
type: choice
11+
required: true
12+
description: "Which package(s) to publish"
13+
options:
14+
- all
15+
- kfp-pipeline-spec
16+
- kfp-server-api
17+
- kfp
18+
- kfp-kubernetes
19+
dry_run:
20+
type: boolean
21+
required: true
22+
default: true
23+
description: "Dry run - build packages without publishing to PyPI"
24+
25+
env:
26+
PYTHON_VERSION: "3.9"
27+
28+
jobs:
29+
publish-kfp-pipeline-spec:
30+
if: ${{ github.event.inputs.packages == 'all' || github.event.inputs.packages == 'kfp-pipeline-spec' }}
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: read
34+
id-token: write
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
with:
39+
ref: ${{ github.event.inputs.tag }}
40+
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ env.PYTHON_VERSION }}
45+
46+
- name: Install build dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install build twine
50+
51+
- name: Build kfp-pipeline-spec
52+
run: |
53+
cd api
54+
make python
55+
cd v2alpha1/python
56+
twine check dist/*
57+
58+
- name: Publish to PyPI
59+
if: ${{ github.event.inputs.dry_run == 'false' }}
60+
uses: pypa/gh-action-pypi-publish@release/v1
61+
with:
62+
packages-dir: api/v2alpha1/python/dist/
63+
print-hash: true
64+
65+
- name: Upload artifacts (dry run)
66+
if: ${{ github.event.inputs.dry_run == 'true' }}
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: kfp-pipeline-spec-dist
70+
path: api/v2alpha1/python/dist/
71+
72+
publish-kfp-server-api:
73+
if: ${{ github.event.inputs.packages == 'all' || github.event.inputs.packages == 'kfp-server-api' }}
74+
runs-on: ubuntu-latest
75+
permissions:
76+
contents: read
77+
id-token: write
78+
steps:
79+
- name: Checkout code
80+
uses: actions/checkout@v4
81+
with:
82+
ref: ${{ github.event.inputs.tag }}
83+
84+
- name: Set up Python
85+
uses: actions/setup-python@v5
86+
with:
87+
python-version: ${{ env.PYTHON_VERSION }}
88+
89+
- name: Install build dependencies
90+
run: |
91+
python -m pip install --upgrade pip
92+
pip install twine
93+
94+
- name: Build kfp-server-api
95+
run: |
96+
cd backend/api/v2beta1/python_http_client
97+
rm -rf dist
98+
python setup.py --quiet sdist
99+
twine check dist/*
100+
101+
- name: Publish to PyPI
102+
if: ${{ github.event.inputs.dry_run == 'false' }}
103+
uses: pypa/gh-action-pypi-publish@release/v1
104+
with:
105+
packages-dir: backend/api/v2beta1/python_http_client/dist/
106+
print-hash: true
107+
108+
- name: Upload artifacts (dry run)
109+
if: ${{ github.event.inputs.dry_run == 'true' }}
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: kfp-server-api-dist
113+
path: backend/api/v2beta1/python_http_client/dist/
114+
115+
publish-kfp:
116+
if: ${{ github.event.inputs.packages == 'all' || github.event.inputs.packages == 'kfp' }}
117+
# Uncomment once all packages in PyPi are configured to be released from this repo.
118+
# needs: [publish-kfp-pipeline-spec, publish-kfp-server-api]
119+
runs-on: ubuntu-latest
120+
permissions:
121+
contents: read
122+
id-token: write
123+
steps:
124+
- name: Checkout code
125+
uses: actions/checkout@v4
126+
with:
127+
ref: ${{ github.event.inputs.tag }}
128+
129+
- name: Set up Python
130+
uses: actions/setup-python@v5
131+
with:
132+
python-version: ${{ env.PYTHON_VERSION }}
133+
134+
- name: Install build dependencies
135+
run: |
136+
python -m pip install --upgrade pip
137+
pip install build twine
138+
139+
- name: Build kfp
140+
run: |
141+
cd sdk
142+
make python
143+
cd python
144+
twine check dist/*
145+
146+
- name: Publish to PyPI
147+
if: ${{ github.event.inputs.dry_run == 'false' }}
148+
uses: pypa/gh-action-pypi-publish@release/v1
149+
with:
150+
packages-dir: sdk/python/dist/
151+
print-hash: true
152+
153+
- name: Upload artifacts (dry run)
154+
if: ${{ github.event.inputs.dry_run == 'true' }}
155+
uses: actions/upload-artifact@v4
156+
with:
157+
name: kfp-dist
158+
path: sdk/python/dist/
159+
160+
publish-kfp-kubernetes:
161+
if: ${{ github.event.inputs.packages == 'all' || github.event.inputs.packages == 'kfp-kubernetes' }}
162+
# Uncomment once all packages in PyPi are configured to be released from this repo.
163+
# needs: [publish-kfp-pipeline-spec, publish-kfp]
164+
runs-on: ubuntu-latest
165+
permissions:
166+
contents: read
167+
id-token: write
168+
steps:
169+
- name: Checkout code
170+
uses: actions/checkout@v4
171+
with:
172+
ref: ${{ github.event.inputs.tag }}
173+
174+
- name: Set up Python
175+
uses: actions/setup-python@v5
176+
with:
177+
python-version: ${{ env.PYTHON_VERSION }}
178+
179+
- name: Install build dependencies
180+
run: |
181+
python -m pip install --upgrade pip
182+
pip install build twine
183+
184+
- name: Build kfp-kubernetes
185+
run: |
186+
cd kubernetes_platform
187+
make python
188+
cd python
189+
twine check dist/*
190+
191+
- name: Publish to PyPI
192+
if: ${{ github.event.inputs.dry_run == 'false' }}
193+
uses: pypa/gh-action-pypi-publish@release/v1
194+
with:
195+
packages-dir: kubernetes_platform/python/dist/
196+
print-hash: true
197+
198+
- name: Upload artifacts (dry run)
199+
if: ${{ github.event.inputs.dry_run == 'true' }}
200+
uses: actions/upload-artifact@v4
201+
with:
202+
name: kfp-kubernetes-dist
203+
path: kubernetes_platform/python/dist/

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
- 'kubernetes_platform/**/*.go'
1818
- 'backend/src/crd/kubernetes/**/*.go'
1919
- 'manifests/kustomize/base/crds/*.yaml'
20+
- 'sdk/**/*.py'
2021
- '!**/*.md'
2122
- '!**/OWNERS'
2223

@@ -55,7 +56,7 @@ jobs:
5556
working-directory: ./backend/src/crd/kubernetes
5657
run: make generate manifests
5758

58-
- name: Generate backend proto code v1beta1
59+
- name: Generate backend proto code v2beta1
5960
working-directory: ./backend/api
6061
env:
6162
API_VERSION: v2beta1
@@ -67,6 +68,18 @@ jobs:
6768
API_VERSION: v1beta1
6869
run: make generate
6970

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

RELEASE.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -224,17 +224,23 @@ All Python packages must be released with wheel and source packages. When doing
224224

225225
When performing these releases, you should adhere to the order presented below.
226226

227-
1. Release `kfp-pipeline-spec` Python packages to PyPI.
228-
Update the version in `setup.py` found in `api/v2alpha1/python/setup.py`.
229-
```bash
230-
git checkout -b release-X.Y
231-
pip3 install twine --user
232-
cd api
233-
make python
234-
cd v2alpha1/python
235-
twine check dist/*
236-
twine upload dist/*
237-
```
227+
> [!Note]
228+
> All python packages should be released with aligned patch versions. For example if you intend to release a new
229+
> patch version x.y.z for `kfp-pipeline-spec`, you must also release a new patch version x.y.z for `kfp`, `kfp-server-api`, and `kfp-kubernetes`.
230+
231+
#### Release `kfp-pipeline-spec` Python packages to PyPI.
232+
233+
Update the version in `setup.py` found in `api/v2alpha1/python/setup.py`.
234+
235+
```bash
236+
git checkout -b release-X.Y
237+
pip3 install twine --user
238+
cd api
239+
make python
240+
cd v2alpha1/python
241+
twine check dist/*
242+
twine upload dist/*
243+
```
238244

239245
1. Release `kfp-server-api` Python packages to PyPI.
240246

@@ -429,6 +435,12 @@ Starting from version **2.14**, all major and minor versions (X.Y) of the Kubefl
429435
* **KFP Python Pipeline Specification**
430436
* **KFP Server API**
431437

438+
The following patches also require that all patch releases be aligned:
439+
* **KFP Python SDK**
440+
* **KFP Python Kubernetes Platform SDK**
441+
* **KFP Python Pipeline Specification**
442+
* **KFP Server API**
443+
432444
### Versioning and Compatibility Policy
433445

434446
* **API Compatibility:**

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.14.3
1+
2.14.6

api/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ python: python fetch-protos
4747
sh -c 'cd /go/src/github.com/kubeflow/pipelines/api/v2alpha1/python && \
4848
python3 -m pip install --user --break-system-packages -r requirements.txt && \
4949
python3 generate_proto.py && \
50-
python3 setup.py sdist bdist_wheel --dist-dir ./dist'
50+
python3 setup.py sdist && pip wheel --no-deps dist/*.tar.gz -w dist'
5151

5252
# Build and locally install Python package using editable mode for development.
5353
.PHONY: python-dev

api/v2alpha1/python/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include requirements.in
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# After any updates to this file, requirements.txt should be regenerated running
2+
# the following in this folder:
3+
# pip-compile --no-emit-index-url requirements.in > requirements.txt
4+
5+
# Typically we can't support multiple major versions of protobuf
6+
# The runtime protobuf package MUST be aligned with the protobuf
7+
# libraries used to generate the code (protoc, protoc-gen-go, etc.)
8+
# For example protobuf 5.x aligns with protoc 26.x-29.x but
9+
# 6.x aligns with 30.x+.
10+
# See for support tiers:
11+
# https://protobuf.dev/support/version-support/#python
12+
protobuf>=6.31.1,<7.0
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Typically we can't support multiple major versions of protobuf
2-
# The runtime protobuf package MUST be aligned with the protobuf
3-
# libraries used to generate the code (protoc, protoc-gen-go, etc.)
4-
# For example protobuf 5.x aligns with protoc 26.x-29.x but
5-
# 6.x aligns with 30.x+.
6-
# See for support tiers:
7-
# https://protobuf.dev/support/version-support/#python
8-
protobuf==6.31.1,<7.0
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.9
3+
# by the following command:
4+
#
5+
# pip-compile --no-emit-index-url requirements.in
6+
#
7+
protobuf==6.31.1
8+
# via -r requirements.in

api/v2alpha1/python/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from typing import List
1818

1919
NAME = 'kfp-pipeline-spec'
20-
VERSION = '2.14.3'
20+
VERSION = '2.14.6'
2121

2222
def get_requirements(requirements_file: str) -> List[str]:
2323
"""Read requirements from requirements.in."""
@@ -38,7 +38,7 @@ def get_requirements(requirements_file: str) -> List[str]:
3838
url='https://github.com/kubeflow/pipelines',
3939
packages=setuptools.find_namespace_packages(include=['kfp.*']),
4040
python_requires='>=3.9.0',
41-
install_requires=get_requirements('requirements.txt'),
41+
install_requires=get_requirements('requirements.in'),
4242
include_package_data=True,
4343
license='Apache 2.0',
4444
)

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

0 commit comments

Comments
 (0)