Skip to content

Commit ec00fa3

Browse files
authored
Cherry-Pick 2.14.2 SDK changes (#12123)
* update kfp server api for kfp sdk (#12120) with the recent proto change the kfp server no long accepts body as an acceptable parameter, due to this breaking change the min kfp-server-api in kfp sdk needs to be bumped and a new kfp sdk needs to be released. Signed-off-by: Humair Khan <[email protected]> * chore: update release instructions (#12117) Signed-off-by: Humair Khan <[email protected]> --------- Signed-off-by: Humair Khan <[email protected]>
1 parent 3fad4df commit ec00fa3

File tree

10 files changed

+133
-74
lines changed

10 files changed

+133
-74
lines changed

RELEASE.md

Lines changed: 91 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
- [Schedule](#schedule)
55
- [Release Tags and Branches](#release-tags-and-branches)
66
- [Contributor Instructions](#contributor-instructions)
7-
- [Cherry picking pull requests to release branch](#cherry-picking-pull-requests-to-release-branch)
7+
- [Cherry-picking pull requests to release branch](#cherry-picking-pull-requests-to-release-branch)
88
- [Option - (Recommended) cherrypick-approved label](#option---recommended-cherrypick-approved-label)
99
- [Option - git cherry-pick](#option---git-cherry-pick)
1010
- [Release Manager Instructions](#release-manager-instructions)
1111
- [Common Prerequisites](#common-prerequisites)
12-
- [Cutting a release branch (Optional)](#cutting-a-release-branch-optional)
12+
- [Cutting a release branch (Optional)](#cutting-a-release-branch)
1313
- [Before release](#before-release)
1414
- [Releasing from release branch](#releasing-from-release-branch)
1515
- [Release KFP Python Packages](#releasing-kfp-python-packages)
@@ -97,7 +97,10 @@ if you only want to use or contribute to this repo.
9797
1. Clone github.com/kubeflow/pipelines repo into `$KFP_REPO`.
9898
2. `cd $KFP_REPO`
9999

100-
### Cutting a release branch (Optional)
100+
### Cutting a release branch
101+
102+
KFP releases are required to be cut from a release branch. This includes all python packages.
103+
Release branches must be scoped to a minor version. The following components should always have all future patch versions tagged and released from their respective minor branch. For example, you would cut a release for SDK 2.14.1 from the release-2.14 branch, the same with KFP backend 2.14.4, kfp-kubernetes 2.14.2, and so on.
101104

102105
1. Choose a good commit on master branch with commit hash as `$COMMIT_SHA`.
103106
1. Choose the next release branch's `$MINOR_VERSION` in format `x.y`, e.g. `1.0`, `1.1`...
@@ -113,9 +116,9 @@ if you only want to use or contribute to this repo.
113116
### Before release
114117
115118
Do the following things before a release:
116-
1. **(Do this step only when releasing from a NON-master release branch)**
119+
1. Cherry-picking
117120
118-
Note: Instead of following this step to cherry pick all PRs, you can also manually cherry pick commits from master branch to release branch, if the number of PRs to cherry pick is minimal. Command for manual cherry pick:
121+
Note: Instead of following this step to cherry-pick all PRs, you can also manually cherry-pick commits from the master branch to release branch, if the number of PRs to cherry-pick is minimal. Command for manual cherry-pick:
119122
120123
```
121124
git cherry-pick <commit-id>
@@ -177,7 +180,6 @@ If not, contact the KFP team to determine if the failure(s) would block the rele
177180
178181
### Releasing from release branch
179182
180-
Note, when releasing from master, all the below mentions of "release branch" means master branch.
181183
182184
1. Choose the release's complete `$VERSION` following semantic versioning, e.g.
183185
- `1.0.0-rc.1`
@@ -193,8 +195,8 @@ Note, when releasing from master, all the below mentions of "release branch" mea
193195
```bash
194196
cd ./test/release && TAG=$VERSION BRANCH=$BRANCH make release
195197
```
196-
197-
It will prompt you whether to push it to release branch. Press `y` and hit `Enter`.
198+
This script updates the version values for various manifests, and generated code.
199+
Once finished, it will prompt you whether to push it to release branch. You can inspect the changes by navigating to the temporary directory it creates. Once you are comfortable with the changes, press `y` and hit `Enter`.
198200

199201
Note, the script will clone kubeflow/pipelines repo into a temporary location on your computer, make those changes and attempt to push to upstream, so that it won't interfere with your current git repo.
200202
@@ -209,51 +211,106 @@ The target tag should be `$VERSION`.
209211
210212
### Releasing KFP Python Packages
211213
212-
1. Release `kfp-server-api` python packages to PyPI.
214+
All Python packages must be released with wheel and source packages. When doing a minor release, you *must* make a release for all Python packages as well, even if there are no new changes there. This includes:
215+
216+
* kfp-pipeline-spec
217+
* kfp
218+
* kfp-kubernetes
219+
* kfp-server-api
220+
213221
222+
> [!Note]
223+
> When making a release, if something goes wrong, always yank the release in pypi, **do not delete** the package and try to re-upload it with the same version, pypi won't let you do this even though it lets you delete the package. In such an event, yank the release and do a new release with a new patch version.
224+
225+
When performing these releases, you should adhere to the order presented below.
226+
227+
1. Release `kfp-pipeline-spec` Python packages to PyPI.
228+
Update the version in `setup.py` found in `api/v2alpha1/python/setup.py`.
214229
```bash
215-
git checkout $BRANCH
216-
git pull upstream $BRANCH
217-
cd backend/api/v2beta1/python_http_client
218-
rm -r dist
219-
python3 setup.py --quiet sdist
220-
python3 -m twine upload dist/*
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/*
221237
```
222238

223-
1. Release `kfp` python packages to PyPI. (Note: Please skip this step for backend release, this step will be handled by SDK release.)
239+
1. Release `kfp` Python packages to PyPI.
224240

225241
Update the SDK version in `version.py` and `readthedocs` `versions.json`, example PR [here](https://github.com/kubeflow/pipelines/pull/11715/files).
226242

227243
```bash
244+
git checkout -b release-X.Y
228245
pip3 install twine --user
229-
cd sdk/python
230-
./build.sh kfp-$VERSION.tar.gz
231-
python3 -m twine upload kfp-$VERSION.tar.gz
246+
cd sdk
247+
make python
248+
cd python
249+
twine check dist/*
250+
twine upload dist/*
232251
```
233252

234253
!!! The file name must contain the version. See <https://github.com/kubeflow/pipelines/issues/1292>
235254

236-
1. Release `kfp-kubernetes` python packages to PyPI. (Note: Please skip this step for backend release, this step will be handled by SDK release.)
255+
** Update Readthedocs **
256+
257+
* Create a GitHub release for KFP SDK release. [Here's an example](https://github.com/kubeflow/pipelines/releases/tag/sdk-2.14.1) reference for a template.
258+
* When creating a release create a new tag `sdk-x.y.z`
259+
* Navigate to the readthedocs website [here](https://app.readthedocs.org/projects/kubeflow-pipelines/), login if needed
260+
* You should see a new build under "Versions" section for this new tag, ensure it succeeds.
261+
* Click "Settings"
262+
* Set the default version to `sdk-x.y.z` (the version we just built and released)
263+
* Set the default branch to be the release branch `release-x.y.z`
264+
265+
1. Release `kfp-kubernetes` Python packages to PyPI.
237266
238267
Update the KFP Kubernetes SDK version in `__init__.py` and `readthedocs` `versions.json`, example PR [here](https://github.com/kubeflow/pipelines/pull/11380).
239268
240269
```bash
241-
export KFP_KUBERNETES_VERSION=
270+
git checkout -b release-X.Y
242271
pip3 install twine --user
272+
cd kubernetes_platform
273+
make python
274+
cd python
275+
twine check dist/*
276+
twine upload dist/*
277+
278+
# Cut release-the-docs branch
279+
export KFP_KUBERNETES_VERSION= # Set this to the version being released x.y.z
243280
cd kubernetes_platform/python
244281
./create_release_branch.sh
245282
```
283+
284+
Follow the output push instructions to **commit and push the read the docs release branch to KFP**.
246285
247-
Follow the output push instructions to **commit and push the branch to KFP**, then do the following:
286+
> [!Note]
287+
> Note that kfp-kubernetes package has a separate readthedocs site and requires that a new branch be pushed for readthedocs to be able to host multiple pages from the same repo.
288+
> Every new patch version for this package requires us to create a new release branch purely for readthedocs purposes. However always cut this branch from the `release-X.Y` branch.
289+
290+
** Update Readthedocs **
291+
Once the branch is updated, you need to add this version to readthedocs. Follow these steps:
292+
293+
* Navigate to the package section on the readthedocs website [here](https://app.readthedocs.org/projects/kfp-kubernetes/).
294+
* Click "Add version"
295+
* Enter the branch `kfp-kubernetes-x.y.z` where x.y.z is the version you released, if you pushed it and it's not showing up, press the "Resync Versions" button and try again
296+
* Add this version, navigate back to the "Versions" section, and you should see a build, make sure it succeeds before moving onto the next section.
297+
* Go to Settings
298+
* Set this version as the default version.
299+
* Click Save
300+
* Click "View Docs" to navigate to the docs page and ensure the new version shows up as the default.
301+
302+
1. Release `kfp-server-api` Python packages to PyPI.
248303

249304
```bash
250-
# set this to the appropriate version that matches what was set in __init__.py earlier
251-
export KFP_KUBERNETES_VERSION=
252-
cd kubernetes_platform/python
253-
./release.sh
305+
git checkout $BRANCH
306+
git pull upstream $BRANCH
307+
cd backend/api/v2beta1/python_http_client
308+
rm -r dist
309+
python3 setup.py --quiet sdist
310+
python3 -m twine upload dist/*
254311
```
255-
256-
Note that this script will build the package, test install, and push to PyPi.
312+
313+
Push the changes to the `release-X.Y` branch.
257314

258315
### Create GitHub Release
259316

@@ -269,7 +326,7 @@ fill in the description. Detailed steps:
269326
<pre>
270327
To deploy Kubeflow Pipelines in an existing cluster, follow the instruction in [here](https://www.kubeflow.org/docs/components/pipelines/operator-guides/installation/)
271328

272-
Install python SDK (python 3.9 above) by running:
329+
Install Python SDK (Python 3.9 above) by running:
273330

274331
```bash
275332
python3 -m pip install kfp kfp-server-api --upgrade
@@ -284,7 +341,7 @@ fill in the description. Detailed steps:
284341
<pre>
285342
To deploy Kubeflow Pipelines in an existing cluster, follow the instruction in [here](https://www.kubeflow.org/docs/components/pipelines/operator-guides/installation/).
286343

287-
Install kfp-server-api package (python 3.9 above) by running:
344+
Install kfp-server-api package (Python 3.9 above) by running:
288345

289346
```bash
290347
python3 -m pip install kfp-server-api==$VERSION --upgrade
@@ -294,13 +351,12 @@ fill in the description. Detailed steps:
294351
* [Upgrade Notes with notices and breaking changes](https://www.kubeflow.org/docs/components/pipelines/installation/upgrade/)
295352
* [Change Log](https://github.com/kubeflow/pipelines/blob/$VERSION/CHANGELOG.md)
296353

297-
NOTE, kfp python SDK is **NOT** included and released separately.
354+
NOTE, kfp Python SDK is **NOT** included and released separately.
298355
</pre>
299356

300357
### Sync Master Branch with latest release
301358

302-
1. **(Do this step only when releasing from a NON-master release branch)**
303-
Update master branch to the same version and include latest changelog:
359+
1. Update master branch to the same version and include latest changelog:
304360

305361
```bash
306362
git checkout master
@@ -350,7 +406,8 @@ Starting from version **2.14**, all major and minor versions (X.Y) of the Kubefl
350406
All KFP components sharing the same major and minor version (X.Y) are guaranteed to be API-compatible.
351407

352408
* **Backward Compatibility:**
353-
The KFP project will make a *best effort* to maintain backward compatibility within a given **major version** for all Python SDK packages.
409+
The KFP project aims to maintain backward compatibility within a given **major version** for all Python SDK packages, though there may be exceptions at times.
410+
354411
Specifically:
355412

356413
* Newer versions of the KFP Python SDK within the same major release (e.g., 2.x) should continue to function with older versions of the KFP backend.

kubernetes_platform/python/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ else
3737
TARGET_TAR_FILE=kfp-kubernetes-$KFP_KUBERNETES_VERSION.tar.gz
3838
pushd "$(dirname "$0")"
3939
dist_dir=$(mktemp -d)
40-
python3 setup.py sdist --format=gztar --dist-dir "$dist_dir"
40+
python3 setup.py sdist bdist_wheel --dist-dir "$dist_dir"
4141
cp "$dist_dir"/*.tar.gz $TARGET_TAR_FILE
4242
popd
4343
echo "Created package."

sdk/Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright 2025 The Kubeflow Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Contact one of chensun, HumairAK if this remote image needs an update.
16+
PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.2
17+
18+
.PHONY: python
19+
python: python
20+
docker run --interactive --rm \
21+
--user $$(id -u):$$(id -g) \
22+
-e HOME=/tmp \
23+
-v "$$(pwd)/..":"/go/src/github.com/kubeflow/pipelines":z \
24+
$(PREBUILT_REMOTE_IMAGE) \
25+
sh -c 'cd /go/src/github.com/kubeflow/pipelines/sdk/python && \
26+
python3 setup.py sdist bdist_wheel --dist-dir ./dist'
27+
28+
.PHONY: clean-python
29+
clean-python:
30+
rm -rf python/build
31+
rm -rf python/dist
32+
rm -rf python/kfp.egg-info

sdk/python/build.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

sdk/python/kfp/client/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def create_experiment(
475475
namespace=namespace,
476476
)
477477
experiment = self._experiment_api.experiment_service_create_experiment(
478-
body=experiment)
478+
experiment=experiment)
479479

480480
link = f'{self._get_url_prefix()}/#/experiments/details/{experiment.experiment_id}'
481481
if auth.is_ipython():
@@ -736,7 +736,7 @@ def run_pipeline(
736736
runtime_config=job_config.runtime_config,
737737
service_account=service_account)
738738

739-
response = self._run_api.run_service_create_run(body=run_body)
739+
response = self._run_api.run_service_create_run(run=run_body)
740740

741741
link = f'{self._get_url_prefix()}/#/runs/details/{response.run_id}'
742742
if auth.is_ipython():
@@ -907,7 +907,7 @@ def create_recurring_run(
907907
max_concurrency=max_concurrency,
908908
service_account=service_account)
909909
return self._recurring_run_api.recurring_run_service_create_recurring_run(
910-
body=job_body)
910+
recurring_run=job_body)
911911

912912
def _create_job_config(
913913
self,

sdk/python/kfp/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.14.1'
1+
__version__ = '2.14.2'

sdk/python/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ kfp-pipeline-spec==2.14.0
1919
# kfp-server-api package is released.
2020
# Update the lower version when kfp sdk depends on new apis/fields in
2121
# kfp-server-api
22-
kfp-server-api>=2.1.0,<3
22+
kfp-server-api>=2.14.0,<3
2323
kubernetes>=8.0.0,<31
2424
# protobuf version should be identical to the one in kfp-pipeline-spec
2525
# api/v2alpha1/python/requirements.txt

sdk/python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ idna==3.10
4949
# via requests
5050
kfp-pipeline-spec==2.14.0
5151
# via -r requirements.in
52-
kfp-server-api==2.5.0
52+
kfp-server-api==2.14.0
5353
# via -r requirements.in
5454
kubernetes==30.1.0
5555
# via -r requirements.in

test/sample-test/requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
kfp==2.14.1
1+
kfp==2.14.2
22
junit-xml
33
minio
44
black

test/sample-test/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,11 @@ jupyter-core==5.8.1
8383
# jupyter-client
8484
# nbclient
8585
# nbformat
86-
kfp==2.14.1
86+
kfp==2.14.2
8787
# via -r requirements.in
8888
kfp-pipeline-spec==2.14.0
8989
# via kfp
90-
kfp-server-api==2.5.0
90+
kfp-server-api==2.14.0
9191
# via kfp
9292
kubernetes==30.1.0
9393
# via

0 commit comments

Comments
 (0)