From b12023ef3bd1cb50715aaaf17aa5ef77dde35073 Mon Sep 17 00:00:00 2001 From: "Yuan (Bob) Gong" Date: Fri, 5 Jun 2020 13:32:21 +0800 Subject: [PATCH] [Release] Various fixes to release script (#3918) * Update kustomize/base/params.env * fix * kfp sdk requirement updated to kfp_api_server<2.0.0 * Fix major minor parsing * Also fix cloudbuild.yaml --- .cloudbuild.yaml | 3 ++- .release.cloudbuild.yaml | 3 ++- RELEASE.md | 1 + manifests/kustomize/hack/release.sh | 3 +++ sdk/python/requirements.in | 2 +- sdk/python/setup.py | 9 +++++---- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.cloudbuild.yaml b/.cloudbuild.yaml index 9acdb403ef5..3489ed14e95 100644 --- a/.cloudbuild.yaml +++ b/.cloudbuild.yaml @@ -228,7 +228,8 @@ steps: - -ceux - | # Parse major minor version and save to a file for reusing in other steps. - cat /workspace/VERSION | sed -e "s#[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)#\1.\2#" > /workspace/mm.ver + # e.g. 1.0.0-rc.1 and 1.0.1 are parsed as 1.0 + echo $TAG_NAME | sed -e "s#\([0-9]\+[.][0-9]\+\)[.].*#\1#" > /workspace/mm.ver # Tag for Hosted - Tag to hosted folder with MKP friendly name - id: 'tagForHosted' diff --git a/.release.cloudbuild.yaml b/.release.cloudbuild.yaml index d6bf8946c97..cc8b5a3ad70 100644 --- a/.release.cloudbuild.yaml +++ b/.release.cloudbuild.yaml @@ -22,7 +22,8 @@ steps: - -ceux - | # Parse major minor version and save to a file for reusing in other steps. - echo $TAG_NAME | sed -e "s#[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)#\1.\2#" > /workspace/mm.ver + # e.g. 1.0.0-rc.1 and 1.0.1 are parsed as 1.0 + echo $TAG_NAME | sed -e "s#\([0-9]\+[.][0-9]\+\)[.].*#\1#" > /workspace/mm.ver # Pull and retag images for pipeline components - id: 'retagComponentImages' diff --git a/RELEASE.md b/RELEASE.md index 6de2eed39a4..01194b8ab5c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -4,6 +4,7 @@ WIP: this document is still incomplete. ## Common Prerequisites +* OS: Linux (MacOS not supported yet due to different behavior of sed) * Permissions needed * Can create a branch in github.com/kubeflow/pipelines * Tools that should be in your `$PATH` diff --git a/manifests/kustomize/hack/release.sh b/manifests/kustomize/hack/release.sh index 8f3cf7aaec7..d233a83bf32 100755 --- a/manifests/kustomize/hack/release.sh +++ b/manifests/kustomize/hack/release.sh @@ -27,3 +27,6 @@ fi echo "This release script uses yq, it can be downloaded at https://github.com/mikefarah/yq/releases/tag/3.3.0" yq w -i "$DIR/../base/kustomization.yaml" images[*].newTag "$TAG_NAME" yq w -i "$DIR/../env/gcp/inverse-proxy/kustomization.yaml" images[*].newTag "$TAG_NAME" + +# Note, this only works in linux. TODO: make it MacOS sed compatible. +sed -i.bak -e "s|appVersion=.\+|appVersion=$TAG_NAME|g" "$DIR/../base/params.env" diff --git a/sdk/python/requirements.in b/sdk/python/requirements.in index 9795801920a..ae0a7d60ea0 100644 --- a/sdk/python/requirements.in +++ b/sdk/python/requirements.in @@ -10,7 +10,7 @@ jsonschema>=3.0.1 kubernetes>=8.0.0, <12.0.0 # kfp.Client -kfp-server-api>=0.2.5, <0.4.0 #Update the upper version whenever a new version of the kfp-server-api package is released. Update the lower version when there is a breaking change in kfp-server-api, or kfp sdk depends on new api changes in kfp-server-api. +kfp-server-api>=0.2.5, <2.0.0 # kfp.Client GCP auth google-cloud-storage>=1.13.0 diff --git a/sdk/python/setup.py b/sdk/python/setup.py index 3f516a90bf1..ed2ea400c79 100644 --- a/sdk/python/setup.py +++ b/sdk/python/setup.py @@ -27,10 +27,11 @@ 'requests_toolbelt>=0.8.0', 'cloudpickle', # Update the upper version whenever a new major version of the - # kfp-server-api package is released. Update the lower version when there is - # a breaking change in kfp-server-api, or kfp sdk depends on new api changes - # in kfp-server-api. - 'kfp-server-api>=0.2.5, <0.6.0', + # kfp-server-api package is released. + # Update the lower version when kfp sdk depends on new apis/fields in + # kfp-server-api. + # Note, please also update ./requirements.in + 'kfp-server-api>=0.2.5, <2.0.0', 'jsonschema >= 3.0.1', 'tabulate', 'click',