Skip to content

Commit

Permalink
Merge pull request #113 from kubeflow/main
Browse files Browse the repository at this point in the history
[pull] main from kubeflow:main
  • Loading branch information
openshift-merge-bot[bot] authored Aug 28, 2024
2 parents 024fb6d + 7e645e0 commit 06e101c
Show file tree
Hide file tree
Showing 18 changed files with 978 additions and 367 deletions.
13 changes: 11 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Description
<!--- Describe your changes in detail -->
<!--- [UI] Include any screenshots of changed UI; Include any gifs if it was a flow / UX change -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
Expand All @@ -12,6 +13,14 @@
<!--- This PR will be merged by any repository approver when it meets all the points in the checklist -->
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->

- [ ] The commits and have meaningful messages; the author will squash them [after approval](https://github.com/opendatahub-io/opendatahub-community/blob/main/contributor-cheatsheet.md#:~:text=Usually%20this%20is%20done%20in%20last%20phase%20of%20a%20PR%20revision) or will ask to merge with squash.
- [ ] The commits have meaningful messages; the author will squash them after approval or in case of manual merges will ask to merge with squash.
- [ ] Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
- [ ] The developer has manually tested the changes and verified that the changes work
- [ ] The developer has manually tested the changes and verified that the changes work.
- [ ] Code changes follow the [kubeflow contribution guidelines](https://www.kubeflow.org/docs/about/contributing/).

If you have UI changes

<!--- You can ignore these if you are doing Go Model Registry REST server, MR Python client, manifest, controller, internal logic, etc changes; aka non-UI / visual changes -->
- [ ] The developer has added tests or explained why testing cannot be added.
- [ ] Included any necessary screenshots or gifs if it was a UI change.
- [ ] Verify that UI/UX changes conform the UX guidelines for Kubeflow.
18 changes: 10 additions & 8 deletions .github/workflows/csi-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ on:
branches:
- "main"
paths-ignore:
- 'LICENSE*'
- '**.gitignore'
- '**.md'
- '**.txt'
- '.github/ISSUE_TEMPLATE/**'
- '.github/dependabot.yml'
- 'docs/**'
- "LICENSE*"
- "**.gitignore"
- "**.md"
- "**.txt"
- ".github/ISSUE_TEMPLATE/**"
- ".github/dependabot.yml"
- "docs/**"
pull_request:
paths:
- "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
- "go.mod"

env:
IMG_ORG: opendatahub
Expand Down Expand Up @@ -47,7 +49,7 @@ jobs:
VERSION: ${{ steps.tags.outputs.tag }}
PUSH_IMAGE: false
run: ./scripts/build_deploy.sh

- name: Build local custom storage initializer
working-directory: ./csi
shell: bash
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ on:
branches:
- "main"
pull_request:
paths-ignore:
- "LICENSE*"
- "**.gitignore"
- "**.md"
- "**.txt"
- ".github/ISSUE_TEMPLATE/**"
- ".github/dependabot.yml"
- "docs/**"
jobs:
tests:
name: ${{ matrix.session }} ${{ matrix.python }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/ui-bff-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: UI - BFF - Build
on:
push:
branches:
- 'main'
- "main"
pull_request:
paths-ignore:
- 'LICENSE*'
- 'DOCKERFILE*'
- '**.gitignore'
- "LICENSE*"
- "DOCKERFILE*"
- "**.gitignore"
- "**.md"
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -17,7 +18,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
go-version: "1.22.2"

- name: Clean
working-directory: clients/ui/bff
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/ui-frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ name: UI - Frontend - Test and Build
on:
push:
branches:
- 'main'
- "main"
pull_request:
paths-ignore:
- 'LICENSE*'
- 'DOCKERFILE*'
- '**.gitignore'
- "LICENSE*"
- "DOCKERFILE*"
- "**.gitignore"
- "**.md"
jobs:
test-and-build:
runs-on: ubuntu-latest
Expand All @@ -17,7 +18,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: "20"

- name: Install dependencies
working-directory: clients/ui/frontend
Expand Down Expand Up @@ -45,4 +46,5 @@ jobs:
echo "Uncommitted file changes detected: $clean"
git diff
exit 1
fi
fi
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ End-to-end testing is developed with Robot Framework; this higher-lever layer of
- demonstrate coherent logical data mapping by performing the same high level capabilities, using REST API flow Vs Python client flow,
directly checking the end results in the backend gRPC MLMD server.

## FAQ

### How do I delete metadata resources using the Model Registry API?

MR utilizes a common `ARCHIVED` status for all types.
To delete something, simply update its status.

## Tips
### Pull image rate limiting

Expand Down
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.5a1"
version = "0.2.6a1"
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.5a1"
__version__ = "0.2.6a1"

from ._client import ModelRegistry

Expand Down
17 changes: 17 additions & 0 deletions clients/ui/frontend/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
chrome: 110,
},
useBuiltIns: 'usage',
corejs: '3',
},
],
'@babel/preset-react',
'@babel/preset-typescript',
],
};

8 changes: 8 additions & 0 deletions clients/ui/frontend/config/transform.file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const path = require('path');

module.exports = {
process(src, filename) {
const assetFilename = JSON.stringify(path.basename(filename));
return `module.exports = ${assetFilename};`;
}
};
1 change: 1 addition & 0 deletions clients/ui/frontend/config/transform.style.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
49 changes: 32 additions & 17 deletions clients/ui/frontend/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,46 @@
// https://jestjs.io/docs/en/configuration.html

module.exports = {
roots: ['<rootDir>/src/'],
testMatch: [
'**/src/__tests__/unit/**/?(*.)+(spec|test).ts?(x)',
'**/__tests__/?(*.)+(spec|test).ts?(x)',
],

// Automatically clear mock calls and instances between every test
clearMocks: true,

// Indicates whether the coverage information should be collected while executing the test
collectCoverage: false,

// The directory where Jest should output its coverage files
coverageDirectory: 'coverage',

// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: [
'node_modules',
'<rootDir>/src'
],
moduleDirectories: ['node_modules', '<rootDir>/src'],

// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/__mocks__/fileMock.js',
'@app/(.*)': '<rootDir>/src/app/$1'
'\\.(css|less|sass|scss)$': '<rootDir>/config/transform.style.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/config/transform.file.js',
'~/(.*)': '<rootDir>/src/$1',
},

// A preset that is used as a base for Jest's configuration
preset: 'ts-jest/presets/js-with-ts',

// The test environment that will be used for testing.
testEnvironment: 'jsdom'
testEnvironment: 'jest-environment-jsdom',

// include projects from node_modules as required
transformIgnorePatterns: [
'node_modules/(?!yaml|lodash-es|uuid|@patternfly|delaunator)',
],

// A list of paths to snapshot serializer modules Jest should use for snapshot testing
snapshotSerializers: [],

setupFilesAfterEnv: ['<rootDir>/src/__tests__/unit/jest.setup.ts'],

coverageDirectory: 'jest-coverage',

collectCoverageFrom: [
'<rootDir>/src/**/*.{ts,tsx}',
'!<rootDir>/src/__tests__/**',
'!<rootDir>/src/__mocks__/**',
'!**/*.spec.{ts,tsx}',
],
};

Loading

0 comments on commit 06e101c

Please sign in to comment.