From 6b25a18396c2dfea40c1d69cbd047c76f1edf1f2 Mon Sep 17 00:00:00 2001 From: Humair Khan Date: Thu, 16 Jan 2025 13:03:30 -0500 Subject: [PATCH] switch release/api generator images to ghcr Also update the go version in api generator image to 1.23 The previous version used 1.20.5, in this version the go generate command would fail on the current go mod (using 1.22), because it expects the go version to be in the format "x.y" insted of "x.y.z", in 1.23 this is no longer an issue. Signed-off-by: Humair Khan --- api/Makefile | 4 ++-- backend/api/Dockerfile | 2 +- backend/api/Makefile | 6 +++--- backend/api/README.md | 8 +++++--- backend/src/v2/README.md | 4 ++-- kubernetes_platform/Makefile | 2 +- test/release/Dockerfile.release | 2 +- test/release/Makefile | 2 +- test/release/README.md | 2 +- test/release/bump-version-docker.sh | 2 +- test/release/release.sh | 2 +- 11 files changed, 19 insertions(+), 17 deletions(-) diff --git a/api/Makefile b/api/Makefile index 461250b5274..7f9bf1b465c 100644 --- a/api/Makefile +++ b/api/Makefile @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Contact one of Bobgy, capri-xiyue or zijianjoy if this remote image needs an update. -PREBUILT_REMOTE_IMAGE=gcr.io/ml-pipeline-test/api-generator:latest +# Contact one of chensun, HumairAK, zijianjoy if this remote image needs an update. +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.0 .PHONY: all all: golang python diff --git a/backend/api/Dockerfile b/backend/api/Dockerfile index d9ff7ffdaeb..54bb9a5d9bb 100644 --- a/backend/api/Dockerfile +++ b/backend/api/Dockerfile @@ -13,7 +13,7 @@ # limitations under the License. # Generate client code (go & json) from API protocol buffers -FROM golang:1.22 as generator +FROM golang:1.23 as generator ENV GRPC_GATEWAY_VERSION v1.9.6 ENV GO_SWAGGER_VERSION v0.18.0 ENV GOLANG_PROTOBUF_VERSION v1.5.1 diff --git a/backend/api/Makefile b/backend/api/Makefile index cdb57424951..4bc5db994e9 100644 --- a/backend/api/Makefile +++ b/backend/api/Makefile @@ -16,10 +16,10 @@ IMAGE_TAG=kfp-api-generator # Contact chensun or zijianjoy if this remote image needs an update. -REMOTE_IMAGE=gcr.io/ml-pipeline-test/api-generator -# Image generated by https://github.com/kubeflow/pipelines/pull/10580 +REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator + # Keep in sync with the version used in test/release/Dockerfile.release -PREBUILT_REMOTE_IMAGE=gcr.io/ml-pipeline-test/api-generator@sha256:41fd3e60ba40430a4c3d87e03be817c5f63b2dfed23059ec9d6bca62ce0cc39c +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.0 CONTAINER_ENGINE ?= docker diff --git a/backend/api/README.md b/backend/api/README.md index ee89763218d..eb2da5bb600 100644 --- a/backend/api/README.md +++ b/backend/api/README.md @@ -81,7 +81,9 @@ API definitions in this folder are used to generate [`v1beta1`](https://www.kube API generator image is defined in [Dockerfile](`./Dockerfile`). If you need to update the container, follow these steps: -1. Update the [Dockerfile](`./Dockerfile`) and build the image by running `docker build -t gcr.io/ml-pipeline-test/api-generator:latest .` -1. Push the new container by running `docker push gcr.io/ml-pipeline-test/api-generator:latest` (requires to be [authenticated](https://cloud.google.com/container-registry/docs/advanced-authentication)). +1. Login to GHCR container registry: `echo "" | docker login ghcr.io -u --password-stdin` + * Replace `` with a GitHub Personal Access Token (PAT) with the write:packages and `read:packages` scopes, as well as `delete:packages` if needed. +1. Update the [Dockerfile](`./Dockerfile`) and build the image by running `docker build -t ghcr.io/kubeflow/kfp-api-generator:$VERSION .` +1. Push the new container by running `docker push ghcr.io/kubeflow/kfp-api-generator:$VERSION` (requires to be [authenticated](https://cloud.google.com/container-registry/docs/advanced-authentication)). 1. Update the `PREBUILT_REMOTE_IMAGE` variable in the [Makefile](./Makefile) to point to your new image. -1. Similarly, push a new version of the release tools image to `gcr.io/ml-pipeline-test/release:latest` and run `make push` in [test/release/Makefile](../../test/release/Makefile). +1. Similarly, push a new version of the release tools image to `ghcr.io/kubeflow/kfp-release:$VERSION` and run `make push` in [test/release/Makefile](../../test/release/Makefile). diff --git a/backend/src/v2/README.md b/backend/src/v2/README.md index b85185f49a3..fd98b9c2b52 100644 --- a/backend/src/v2/README.md +++ b/backend/src/v2/README.md @@ -33,11 +33,11 @@ it should have the following content: For example: ```makefile - export DEV_IMAGE_PREFIX=gcr.io/ml-pipeline-test/kfp- + export DEV_IMAGE_PREFIX=ghcr.io/kubeflow-test/kfp-/kfp- ``` Then after images are built, they will be pushed to locations like - `gcr.io/ml-pipeline-test/kfp-driver`. + `ghcr.io/kubeflow-test/kfp-driver`. The `.env` file is ignored by git, it's your local development configuration. diff --git a/kubernetes_platform/Makefile b/kubernetes_platform/Makefile index c84a6400f93..5a7ab0fc313 100644 --- a/kubernetes_platform/Makefile +++ b/kubernetes_platform/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -PREBUILT_REMOTE_IMAGE=gcr.io/ml-pipeline-test/api-generator:latest +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-api-generator:1.0 .PHONY: all all: golang python diff --git a/test/release/Dockerfile.release b/test/release/Dockerfile.release index 09d25adc400..d405eabe654 100644 --- a/test/release/Dockerfile.release +++ b/test/release/Dockerfile.release @@ -14,7 +14,7 @@ # Based on KFP backend api client generator dockerfile # Keep in sync with the version used in backend/api/Makefile -FROM gcr.io/ml-pipeline-test/api-generator@sha256:41fd3e60ba40430a4c3d87e03be817c5f63b2dfed23059ec9d6bca62ce0cc39c +FROM ghcr.io/kubeflow/kfp-api-generator:1.0 # install nvm & node 12 # Reference: https://stackoverflow.com/a/28390848 diff --git a/test/release/Makefile b/test/release/Makefile index cc3405992e1..102fa0aa6a9 100644 --- a/test/release/Makefile +++ b/test/release/Makefile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -REMOTE=gcr.io/ml-pipeline-test/release@sha256:ed1a4dbe536e7e161ad0d846b5681aacc0e0e7f285985cb1808c5c8987bcfeb0 +REMOTE=ghcr.io/kubeflow/kfp-release:1.0 CONTAINER_ENGINE ?= docker diff --git a/test/release/README.md b/test/release/README.md index 5d4763ba7b1..df0fb498cb6 100644 --- a/test/release/README.md +++ b/test/release/README.md @@ -35,7 +35,7 @@ The script `./release.sh` is a wrapper The script `./bump-version-docker.sh` -1. Runs `./bump-version-in-place.sh` in gcr.io/ml-pipeline-test/release:latest image. +1. Runs `./bump-version-in-place.sh` in ghcr.io/kubeflow/kfp-release:$VERSION image. The script `./bump-version-in-place.sh` does the following: diff --git a/test/release/bump-version-docker.sh b/test/release/bump-version-docker.sh index 82190971b17..5cd4998f925 100755 --- a/test/release/bump-version-docker.sh +++ b/test/release/bump-version-docker.sh @@ -31,7 +31,7 @@ if [[ -z "$TAG_NAME" ]]; then fi pushd "${REPO_ROOT}" -RELEASE_IMAGE=${RELEASE_IMAGE:-gcr.io/ml-pipeline-test/release@sha256:ed1a4dbe536e7e161ad0d846b5681aacc0e0e7f285985cb1808c5c8987bcfeb0} +RELEASE_IMAGE=${RELEASE_IMAGE:-ghcr.io/kubeflow/kfp-release:1.0} docker run -it --rm \ --user $(id -u):$(id -g) \ --mount type=bind,source="$(pwd)",target=/go/src/github.com/kubeflow/pipelines \ diff --git a/test/release/release.sh b/test/release/release.sh index 9984038f88c..80323f86fba 100755 --- a/test/release/release.sh +++ b/test/release/release.sh @@ -52,7 +52,7 @@ fi echo "Running the bump version script in cloned repo" echo -n "$TAG" > ./VERSION -PREBUILT_REMOTE_IMAGE=gcr.io/ml-pipeline-test/release@sha256:ed1a4dbe536e7e161ad0d846b5681aacc0e0e7f285985cb1808c5c8987bcfeb0 +PREBUILT_REMOTE_IMAGE=ghcr.io/kubeflow/kfp-release:1.0 pushd ./test/release make release-in-place popd