Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] main from kubeflow:main #164

Merged
merged 20 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8a39ad5
fix: patch requests to artifact endpoint make mr panic (#718)
Al-Pragliola Jan 20, 2025
39beea8
feat(bff) crud for api/v1/model_registry/{model_registry_id}/artifact…
ederign Jan 21, 2025
7a7c093
chore: bump py version to 0.2.13 (#722)
tarilabs Jan 21, 2025
59b3326
fix(nav, masthead): Edit navbar styling to handle dynamic window sizi…
jenny-s51 Jan 21, 2025
de52a0b
Fix issue with make command (#723)
lucferbux Jan 21, 2025
979b1ed
Keep up with midstream (#706)
lucferbux Jan 22, 2025
d06665b
build(deps-dev): bump react-router-dom from 7.1.1 to 7.1.3 in /client…
dependabot[bot] Jan 22, 2025
ecf4e54
fix(frontend): adding missing key for SimpleSelect (#729)
ederign Jan 23, 2025
ddb7961
chore(frontend): FE version bump for eslint-plugin-react-hooks, types…
ederign Jan 23, 2025
62cfc06
Update install_protoc.sh script to support apple architectures (#732)
Crazyglue Jan 23, 2025
462790c
chore(bff): version bump for golang 1.22.2 -> 1.23.5, go lint v1.63.4…
ederign Jan 24, 2025
8120c99
build(deps-dev): bump @mui/icons-material from 6.1.10 to 6.4.1 in /cl…
dependabot[bot] Jan 27, 2025
8498a22
build(deps-dev): bump @testing-library/user-event from 14.5.2 to 14.6…
dependabot[bot] Jan 27, 2025
2eb66b4
Moving UI Manifests to root manifests directory (#731)
Griffin-Sullivan Jan 28, 2025
822028f
chore(go): bump golang version to 1.22 (#689)
Al-Pragliola Jan 28, 2025
77657a1
Update verify_ssl behaviour in Configuration class (#726)
lugi0 Jan 29, 2025
66ea120
fix(bff): bump golang base image in Dockerfile (#742)
Al-Pragliola Jan 29, 2025
3fb4a14
build(deps): bump pydantic from 2.10.4 to 2.10.6 in /clients/python (…
dependabot[bot] Jan 30, 2025
de8af6f
build(deps-dev): bump mypy from 1.14.0 to 1.14.1 in /clients/python (…
dependabot[bot] Jan 30, 2025
c09e98b
build(deps-dev): bump ruff from 0.9.2 to 0.9.3 in /clients/python (#736)
dependabot[bot] Jan 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ui-bff-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.22.2"
go-version: "1.23.5"

- name: Clean
working-directory: clients/ui/bff
Expand All @@ -27,7 +27,7 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.57.2
version: v1.63.4
working-directory: clients/ui/bff/

- name: Build
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Model registry provides a central repository for model developers to store and m
8. [UI](.clients/ui/README.md)

## Pre-requisites:
- go >= 1.21
- go >= 1.22
- protoc v24.3 - [Protocol Buffers v24.3 Release](https://github.com/protocolbuffers/protobuf/releases/tag/v24.3)
- npm >= 10.2.0 - [Installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
- Java >= 11.0
Expand Down Expand Up @@ -173,7 +173,7 @@ To delete something, simply update its status.
## Tips
### Pull image rate limiting

Ocassionally you may encounter an 'ImagePullBackOff' error when deploying the Model Registry manifests. See example below for the `model-registry-db` container.
Ocassionally you may encounter an 'ImagePullBackOff' error when deploying the Model Registry manifests. See example below for the `model-registry-db` container.

```
Failed to pull image “mysql:8.3.0”: rpc error: code = Unknown desc = fetching target platform image selected from image index: reading manifest sha256:f9097d95a4ba5451fff79f4110ea6d750ac17ca08840f1190a73320b84ca4c62 in docker.io/library/mysql: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
Expand Down
116 changes: 61 additions & 55 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.12"
version = "0.2.13"
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.12"
__version__ = "0.2.13"

from ._client import ModelRegistry

Expand Down
2 changes: 1 addition & 1 deletion clients/python/src/model_registry/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def insecure_connection(
user_token: The PEM-encoded user token as a string.
"""
return cls(
Configuration(host=f"{server_address}:{port}", access_token=user_token)
Configuration(host=f"{server_address}:{port}", access_token=user_token, verify_ssl=False)
)

@asynccontextmanager
Expand Down
8 changes: 6 additions & 2 deletions clients/python/src/mr_openapi/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ class Configuration:
string values to replace variables in templated server configuration.
The validation of enums is performed for variables with defined enum
values before.
:param ssl_ca_cert: str - the path to a file of concatenated CA certificates
:param ssl_ca_cert: str - The path to a file of concatenated CA certificates
in PEM format.
:param verify_ssl: bool - Whether to verify the SSL certificate when making API
requests to an HTTPS server.
Set to False to disable verification, default=True.

:Example:
"""
Expand All @@ -74,6 +77,7 @@ def __init__(
server_operation_index=None,
server_operation_variables=None,
ssl_ca_cert=None,
verify_ssl=True,
) -> None:
"""Constructor."""
self._base_path = "https://localhost:8080" if host is None else host
Expand Down Expand Up @@ -133,7 +137,7 @@ def __init__(
"""Debug switch
"""

self.verify_ssl = True
self.verify_ssl = verify_ssl
"""SSL/TLS verification
Set this to false to skip verifying SSL certificate when calling API
from https server.
Expand Down
33 changes: 33 additions & 0 deletions clients/python/tests/regression_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest
import requests

from model_registry import ModelRegistry
from model_registry.types.artifacts import ModelArtifact
Expand Down Expand Up @@ -99,3 +100,35 @@ async def test_create_standalone_model_artifact(client: ModelRegistry):
assert mv.id
mv_ma = await client._api.upsert_model_version_artifact(new_ma, mv.id)
assert mv_ma.id == new_ma.id

@pytest.mark.e2e
async def test_patch_model_artifacts_artifact_type(client: ModelRegistry):
"""Patching Artifacts makes the model registry server panic.

reported with https://issues.redhat.com/browse/RHOAIENG-16932
"""
name = "test_model"
version = "1.0.0"
rm = client.register_model(
name,
"s3",
model_format_name="test_format",
model_format_version="test_version",
version=version,
)
assert rm.id
mv = client.get_model_version(name, version)
assert mv
assert mv.id
ma = client.get_model_artifact(name, version)
assert ma
assert ma.id

payload = { "modelFormatName": "foo", "artifactType": "model-artifact" }
from .conftest import REGISTRY_HOST, REGISTRY_PORT
response = requests.patch(url=f"{REGISTRY_HOST}:{REGISTRY_PORT}/api/model_registry/v1alpha3/artifacts/{ma.id}", json=payload, timeout=10, headers={"Content-Type": "application/json"})
assert response.status_code == 200
ma = client.get_model_artifact(name, version)
assert ma
assert ma.id
assert ma.model_format_name == "foo"
4 changes: 3 additions & 1 deletion clients/ui/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ ARG BFF_SOURCE_CODE=./bff

# Set the base images for the build stages
ARG NODE_BASE_IMAGE=node:20
ARG GOLANG_BASE_IMAGE=golang:1.22.2
ARG GOLANG_BASE_IMAGE=golang:1.23.5
ARG DISTROLESS_BASE_IMAGE=gcr.io/distroless/static:nonroot

# UI build stage
FROM ${NODE_BASE_IMAGE} AS ui-builder

ARG UI_SOURCE_CODE
ARG DEPLOYMENT_MODE
ARG MOCK_AUTH

WORKDIR /usr/src/app

Expand Down
6 changes: 3 additions & 3 deletions clients/ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ docker-build:

.PHONY: docker-build-standalone
docker-build-standalone:
MOCK_AUTH=true DEPLOYMENT_MODE=standalone $(CONTAINER_TOOL) build -t ${IMG_UI_STANDALONE} .
$(CONTAINER_TOOL) build --build-arg MOCK_AUTH=true --build-arg DEPLOYMENT_MODE=standalone -t ${IMG_UI_STANDALONE} .

.PHONY: docker-buildx
docker-buildx:
docker buildx build --platform ${PLATFORM} -t ${IMG_UI} --push .

.PHONY: docker-buildx-standalone
docker-buildx-standalone:
MOCK_AUTH=true DEPLOYMENT_MODE=standalone docker buildx build --platform ${PLATFORM} -t ${IMG_UI_STANDALONE} --push .
docker buildx build --build-arg MOCK_AUTH=true --build-arg DEPLOYMENT_MODE=standalone --platform ${PLATFORM} -t ${IMG_UI_STANDALONE} --push .

############ Push ############

Expand All @@ -83,7 +83,7 @@ frontend-build:

.PHONY: frontend-build-standalone
frontend-build-standalone:
MOCK_AUTH=true DEPLOYMENT_MODE=standalone cd frontend && npm run build:prod
cd frontend && MOCK_AUTH=true DEPLOYMENT_MODE=standalone npm run build:prod

.PHONY: bff-build
bff-build:
Expand Down
2 changes: 1 addition & 1 deletion clients/ui/bff/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest-$(ENVTEST_VERSION)
GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)

## Tool Versions
GOLANGCI_LINT_VERSION ?= v1.57.2
GOLANGCI_LINT_VERSION ?= v1.63.4
ENVTEST_VERSION ?= release-0.17

.PHONY: envtest
Expand Down
Loading