Skip to content

Commit

Permalink
merge sync upstream KF/model-registry to midstream ODH
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Mortari <[email protected]>
  • Loading branch information
tarilabs committed Dec 11, 2024
2 parents be1d318 + d90b19f commit 43171af
Show file tree
Hide file tree
Showing 29 changed files with 318 additions and 830 deletions.
1 change: 0 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ updates:
directories:
- "/"
- "/clients/ui/bff/"
- "/csi"
schedule:
interval: "weekly"
- package-ecosystem: "pip"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,13 @@ jobs:
run: make docker/login
# build & push
- name: Build CSI Image
working-directory: ./csi
shell: bash
env:
IMG_ORG: ${{ env.IMG_ORG }}
IMG_REPO: ${{ env.IMG_REPO }}
IMG_VERSION: ${{ env.VERSION }}
run: |
make docker-build-dev
make image/build
- name: Push CSI Image
if: env.PUSH_IMAGE == 'true'
shell: bash
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/csi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ on:
- "docs/**"
pull_request:
paths:
- "csi/**"
- "cmd/csi/**"
- "internal/csi/**"
- "internal/server/openapi/api_model_registry_service*"
- "pkg/openapi/**"
# csi build depends on base go.mod https://github.com/kubeflow/model-registry/issues/311
Expand Down Expand Up @@ -51,26 +52,24 @@ jobs:
run: ./scripts/build_deploy.sh

- name: Build local custom storage initializer
working-directory: ./csi
shell: bash
env:
IMG_REPO: ${{ env.MODEL_REGISTRY_CSI_IMG }}
IMG_VERSION: ${{ steps.tags.outputs.tag }}
run: make docker-build-dev
run: make image/build

- name: Start KinD cluster
uses: helm/[email protected]
with:
node_image: "kindest/node:v1.27.11"

- name: Install kustomize
run: ./csi/scripts/install_kustomize.sh
run: ./test/scripts/install_kustomize.sh

- name: Run tests
working-directory: ./csi
shell: bash
env:
MR_IMG: "quay.io/${{ env.IMG_ORG }}/${{ env.MODEL_REGISTRY_IMG }}:${{ steps.tags.outputs.tag }}"
MR_CSI_IMG: "quay.io/${{ env.IMG_ORG }}/${{ env.MODEL_REGISTRY_CSI_IMG }}:${{ steps.tags.outputs.tag }}"
CLUSTER: chart-testing
run: ./test/e2e_test.sh
run: ./test/csi/e2e_test.sh
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ readme.txt
certs/
#OSX files
**/.DS_Store

# CSI executable
mr-storage-initializer

# KServe manifests
istio-*
30 changes: 27 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PROJECT_BIN := $(PROJECT_PATH)/bin
GO ?= "$(shell which go)"
BFF_PATH := $(PROJECT_PATH)/clients/ui/bff
UI_PATH := $(PROJECT_PATH)/clients/ui/frontend
CSI_PATH := $(PROJECT_PATH)/cmd/csi

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.29
Expand Down Expand Up @@ -47,6 +48,11 @@ ifeq ($(IMG_REPO),model-registry-bff)
BUILD_PATH := $(BFF_PATH)
endif

# The BUILD_PATH is still the root
ifeq ($(IMG_REPO),model-registry-storage-initializer)
DOCKERFILE := $(CSI_PATH)/Dockerfile.csi
endif

model-registry: build

# clean the ml-metadata protos and trigger a fresh new build which downloads
Expand Down Expand Up @@ -114,11 +120,15 @@ pkg/openapi/client.go: bin/openapi-generator-cli api/openapi/model-registry.yaml
vet:
${GO} vet ./...

.PHONY: clean/csi
clean/csi:
rm -Rf ./mr-storage-initializer

.PHONY: clean-pkg-openapi
while IFS= read -r file; do rm -f "pkg/openapi/$file"; done < pkg/openapi/.openapi-generator/FILES

.PHONY: clean clean-pkg-openapi
clean:
.PHONY: clean
clean: clean-pkg-openapi clean/csi
rm -Rf ./model-registry internal/ml_metadata/proto/*.go internal/converter/generated/*.go internal/server/openapi/api_model_registry_service.go

.PHONY: clean/odh
Expand Down Expand Up @@ -197,6 +207,16 @@ build: build/prepare build/compile
build/odh: vet
${GO} build -buildvcs=false

.PHONY: build/prepare/csi
build/prepare/csi: build/prepare lint/csi

.PHONY: build/compile/csi
build/compile/csi:
${GO} build -buildvcs=false -o mr-storage-initializer ${CSI_PATH}/main.go

.PHONY: build/csi
build/csi: build/prepare/csi build/compile/csi

.PHONY: gen
gen: deps gen/grpc gen/openapi gen/openapi-server gen/converter
${GO} generate ./...
Expand All @@ -206,6 +226,11 @@ lint:
${GOLANGCI_LINT} run main.go --timeout 3m
${GOLANGCI_LINT} run cmd/... internal/... ./pkg/... --timeout 3m

.PHONY: lint/csi
lint/csi:
${GOLANGCI_LINT} run ${CSI_PATH}/main.go
${GOLANGCI_LINT} run internal/csi/...

.PHONY: test
test: gen bin/envtest
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" ${GO} test ./internal/... ./pkg/...
Expand Down Expand Up @@ -236,7 +261,6 @@ else
$(DOCKER) login -u "${DOCKER_USER}" -p "${DOCKER_PWD}"
endif


# build docker image
.PHONY: image/build
image/build:
Expand Down
336 changes: 168 additions & 168 deletions clients/python/poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion clients/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "model-registry"
version = "0.2.11"
version = "0.2.12"
description = "Client for Kubeflow Model Registry"
authors = ["Isabella Basso do Amaral <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion clients/python/src/model_registry/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Main package for the Kubeflow model registry."""

__version__ = "0.2.11"
__version__ = "0.2.12"

from ._client import ModelRegistry

Expand Down
78 changes: 35 additions & 43 deletions clients/ui/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"@babel/preset-env": "^7.21.5",
"@babel/preset-react": "^7.18.6",
"@babel/preset-typescript": "^7.21.5",
"@cypress/code-coverage": "^3.13.7",
"@cypress/code-coverage": "^3.13.8",
"@mui/material": "^6.1.7",
"@mui/icons-material": "^6.1.9",
"@mui/icons-material": "^6.1.10",
"@mui/types": "^7.2.17",
"@testing-library/cypress": "^10.0.1",
"@testing-library/dom": "^10.4.0",
Expand Down
Loading

0 comments on commit 43171af

Please sign in to comment.