pipelines/backend/api
Lingqing Gan 6c6b1e3a94
chore(backend): move v1 api to v1beta1 package and folder (#8376)
* move v1 api to v1beta1 package and folder

* fix test

* update README.md

* update README.md

* update readme
2022-10-26 07:11:30 +00:00
..
hack chore(backend): move v1 api to v1beta1 package and folder (#8376) 2022-10-26 07:11:30 +00:00
v1beta1 chore(backend): move v1 api to v1beta1 package and folder (#8376) 2022-10-26 07:11:30 +00:00
.gitignore fix(backend): remove Bazel from building the API. Part of #3250 (#4906) 2021-02-16 16:58:30 -08:00
Dockerfile fix(backend): Upgrade grpc-gateway patch version to enable correct swagger config (#7788) 2022-06-01 19:09:49 +00:00
Makefile chore(backend): move v1 api to v1beta1 package and folder (#8376) 2022-10-26 07:11:30 +00:00
README.md chore(backend): move v1 api to v1beta1 package and folder (#8376) 2022-10-26 07:11:30 +00:00
build_kfp_server_api_python_package.sh chore(backend): move v1 api to v1beta1 package and folder (#8376) 2022-10-26 07:11:30 +00:00

README.md

Kubeflow Pipelines API

Before You Start

Tools needed:

  • Docker
  • Make

Set environment variable API_VERSION to the version that you want to generate. We use v1beta1 as example here.

export API_VERSION="v1beta1"

Auto-generation of Go client and swagger definitions

Use make generate command to generate clients using a pre-built api-generator image:

make generate

Code will be generated in:

  • ./${API_VERSION}/go_client
  • ./${API_VERSION}/go_http_client
  • ./${API_VERSION}/swagger

Note: ./${API_VERSION}/swagger/pipeline.upload.swagger.json is manually created, while the rest ./${API_VERSION}/swagger/*.swagger.json are auto generated.

Auto-generation of Python client

This will generate the Python client for the API version specified in the environment variable.

./build_kfp_server_api_python_package.sh

Code will be generated in ./${API_VERSION}/python_http_client.

Auto-generation of API reference documentation

This directory contains API definitions. They are used to generate the API reference on kubeflow.org.

Note: whenever the API definition changes (i.e., the file kfp_api_single_file.swagger.json changes), the API reference needs to be updated.

Auto-generation of api generator image

make push

When you update the Dockerfile, to make sure others are using the same image as you do:

  1. push a new version of the api generator image to gcr.io/ml-pipeline-test/api-generator:latest.
  2. update the PREBUILT_REMOTE_IMAGE var in Makefile to point to your new image.
  3. push a new version of the release tools image to gcr.io/ml-pipeline-test/release:latest, run make push in test/release/Makefile.