backend/

directory
v0.0.0-...-13f83cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2024 License: Apache-2.0

README

This directory contains code for the components that comprise the Kubeflow Pipelines backend.

Building & Testing

To run all unittests for backend:

go test -v -cover ./backend/...

The API server itself can be built using:

go build -o /tmp/apiserver backend/src/apiserver/*.go

Code Style

Backend codebase follows the Google's Go Style Guide. Please, take time to get familiar with the best practices. It is not intended to be exhaustive, but it often helps minimizing guesswork among developers and keep codebase uniform and consistent.

We use golangci-lint tool that can catch common mistakes locally (see detailed configuration here). It can be conveniently integrated with multiple popular IDEs such as VS Code or Vim.

Finally, it is advised to install pre-commit in order to automate linter checks (see configuration here)

Building APIServer image locally

The API server image can be built from the root folder of the repo using:

export API_SERVER_IMAGE=api_server
docker build -f backend/Dockerfile . --tag $API_SERVER_IMAGE

Deploy APIServer with the image you own build

Run

kubectl edit deployment.v1.apps/ml-pipeline -n kubeflow

You'll see the field reference the api server docker image. Change it to point to your own build, after saving and closing the file, apiserver will restart with your change.

Building client library and swagger files

After making changes to proto files, the Go client libraries, Python client libraries and swagger files need to be regenerated and checked-in. Refer to backend/api for details.

Updating licenses info

  1. Install go-licenses tool and refer to its documentation for how to use it.

  2. Run the tool to update all licenses:

    make all
    

Updating python dependencies

pip-tools is used to manage python dependencies. To update dependencies, edit requirements.in and run ./update_requirements.sh to update and pin the transitive dependencies.

Visualization Server Instructions

Updating python dependencies

pip-tools is used to manage python dependencies. To update dependencies, edit requirements.in and run ./update_requirements.sh to update and pin the transitive dependencies.

Building conformance tests (WIP)

Run

docker build . -f backend/Dockerfile.conformance -t <tag>

Directories

Path Synopsis
api
v1beta1/go_client
Package go_client is a reverse proxy.
Package go_client is a reverse proxy.
v2beta1/go_client
Package go_client is a reverse proxy.
Package go_client is a reverse proxy.
src
apiserver/filter
Package filter contains types and methods for parsing and applying filters to resources being queried by a ListXXX request.
Package filter contains types and methods for parsing and applying filters to resources being queried by a ListXXX request.
apiserver/list
Package list contains types and methods for performing ListXXX operations.
Package list contains types and methods for performing ListXXX operations.
crd/controller/viewer
Package main is the main binary for running the Viewer Kubernetes CRD controller.
Package main is the main binary for running the Viewer Kubernetes CRD controller.
crd/controller/viewer/reconciler
Package reconciler describes a Reconciler for working with Viewer CRDs.
Package reconciler describes a Reconciler for working with Viewer CRDs.
crd/pkg/apis/scheduledworkflow/v1beta1
Package v1beta1 is the v1beta1 version of the API.
Package v1beta1 is the v1beta1 version of the API.
crd/pkg/apis/viewer
Package viewer contains types that define the Viewer CRD for Kubeflow Pipelines.
Package viewer contains types that define the Viewer CRD for Kubeflow Pipelines.
crd/pkg/apis/viewer/v1beta1
Package v1beta1 is the v1beta1 version of the API.
Package v1beta1 is the v1beta1 version of the API.
crd/pkg/client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
crd/pkg/client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
crd/pkg/client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
v2/cmd/launcher-v2
Launcher command for Kubeflow Pipelines v2.
Launcher command for Kubeflow Pipelines v2.
v2/compiler
Package compiler is the backend compiler package for Kubeflow Pipelines v2.
Package compiler is the backend compiler package for Kubeflow Pipelines v2.
v2/config
Package metadata contains types to record/retrieve metadata stored in MLMD for individual pipeline steps.
Package metadata contains types to record/retrieve metadata stored in MLMD for individual pipeline steps.
v2/metadata
Package metadata contains types to record/retrieve metadata stored in MLMD for individual pipeline steps.
Package metadata contains types to record/retrieve metadata stored in MLMD for individual pipeline steps.
v2/objectstore
This package contains helper methods for using object stores.
This package contains helper methods for using object stores.
v2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL