Skip to content

Commit

Permalink
Merge pull request #421 from israel-hdez/j9436-kserve014-upgrade
Browse files Browse the repository at this point in the history
Code sync for upstream v0.14.0
  • Loading branch information
israel-hdez authored Oct 28, 2024
2 parents 1663443 + c9453bf commit 733c1c3
Show file tree
Hide file tree
Showing 523 changed files with 242,684 additions and 35,090 deletions.
8 changes: 3 additions & 5 deletions .github/actions/minikube-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@ runs:
- name: Install kubectl
uses: azure/[email protected]
with:
version: 'v1.27.4'
version: 'v1.29.7'

- name: Setup Minikube
uses: medyagh/setup-minikube@latest
with:
minikube-version: '1.32.0'
kubernetes-version: 'v1.27.4'
minikube-version: '1.33.1'
kubernetes-version: 'v1.29.7'
driver: 'none'
network-plugin: 'cni'
cni: 'calico'
wait: 'all'
start-args: --wait-timeout=6m0s

Expand Down
31 changes: 31 additions & 0 deletions .github/labels.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Labels for labeling issues and pull requests using GitHub prow action.
kind:
- 'bug'
- 'discussion'
- 'feature'
- 'process'
- 'question'

area:
- 'api'
- 'azure'
- 'docs'
- 'example'
- 'gcp'
- 'inference'
- 'infrastructure-feature'
- 'logging'
- 'operator'
- 'performance'
- 'testing'
- 'project-health'
- 'servingruntime'
- 'inferencegraph'
- 'storage'
- 'inferenceservice'
- 'control-plane'

priority:
- 'p0'
- 'p1'
- 'p2'
2 changes: 1 addition & 1 deletion .github/workflows/automated-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21
go-version: 1.22

- name: Checkout source code
uses: actions/checkout@v4
Expand Down
62 changes: 43 additions & 19 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
BASE_ARTIFACT_PREFIX: "base"
# Controller images
CONTROLLER_IMG: "kserve-controller"
LOCALMODEL_CONTROLLER_IMG: "kserve-localmodel-controller"
STORAGE_INIT_IMG: "storage-initializer"
AGENT_IMG: "agent"
ROUTER_IMG: "router"
Expand Down Expand Up @@ -55,6 +56,9 @@ jobs:
- name: Checkout source
uses: actions/checkout@v4

- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

Expand All @@ -73,6 +77,14 @@ jobs:
path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.CONTROLLER_IMG }}-${{ github.sha }}
compression-level: 0
if-no-files-found: error

- name: Upload localmodel controller image
uses: actions/upload-artifact@v4
with:
name: ${{ env.BASE_ARTIFACT_PREFIX }}-${{ env.LOCALMODEL_CONTROLLER_IMG }}-${{ github.sha }}
path: ${{ env.DOCKER_IMAGES_PATH }}/${{ env.LOCALMODEL_CONTROLLER_IMG }}-${{ github.sha }}
compression-level: 0
if-no-files-found: error

- name: Upload agent image
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -272,7 +284,7 @@ jobs:
if-no-files-found: error

test-predictor:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[
kserve-image-build,
Expand All @@ -288,7 +300,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -337,7 +349,7 @@ jobs:
./test/scripts/gh-actions/status-check.sh
test-transformer-explainer-mms:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[kserve-image-build, predictor-runtime-build, explainer-runtime-build]
steps:
Expand All @@ -350,7 +362,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -416,7 +429,7 @@ jobs:
./test/scripts/gh-actions/status-check.sh
test-graph:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[
kserve-image-build,
Expand All @@ -430,7 +443,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -495,7 +508,7 @@ jobs:
test-path-based-routing:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[
kserve-image-build,
Expand All @@ -508,7 +521,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -551,6 +564,12 @@ jobs:
name: ${{ env.TRANSFORMER_ARTIFACT_PREFIX }}-${{ env.IMAGE_TRANSFORMER_IMG }}-${{ github.sha }}
path: ./tmp

- name: Download Art Explainer image
uses: actions/download-artifact@v4
with:
name: ${{ env.EXPLAINER_ARTIFACT_PREFIX }}-${{ env.ART_IMG }}-${{ github.sha }}
path: ./tmp

- name: Load docker images
uses: ./.github/actions/load-docker-images
with:
Expand Down Expand Up @@ -582,7 +601,7 @@ jobs:
./test/scripts/gh-actions/status-check.sh
test-qpext:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: [kserve-image-build, predictor-runtime-build]
steps:
- name: Checkout source
Expand All @@ -594,7 +613,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -647,22 +666,26 @@ jobs:
./test/scripts/gh-actions/status-check.sh
test-with-helm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[kserve-image-build]
steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"

- uses: ./.github/actions/free-up-disk-space
- name: Free-up disk space
uses: ./.github/actions/free-up-disk-space

- name: Setup Minikube
uses: ./.github/actions/minikube-setup

Expand Down Expand Up @@ -694,7 +717,7 @@ jobs:
./test/scripts/gh-actions/status-check.sh
test-raw:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[kserve-image-build, predictor-runtime-build]
steps:
Expand All @@ -707,7 +730,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -774,7 +797,7 @@ jobs:
./test/scripts/gh-actions/status-check.sh
test-kourier:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[kserve-image-build, predictor-runtime-build, graph-tests-images-build]
steps:
Expand All @@ -787,7 +810,8 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down Expand Up @@ -858,7 +882,7 @@ jobs:
./test/scripts/gh-actions/status-check.sh "kourier"
test-llm:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs:
[ kserve-image-build, predictor-runtime-build]
steps:
Expand All @@ -871,7 +895,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
id: go

- name: Check out code into the Go module directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/kserve-localmodel-controller-docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Kserve localmodel controller Docker Publisher

on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master

# Publish `v1.2.3` tags as releases.
tags:
- v*

# Run tests for any PRs.
pull_request:

env:
IMAGE_NAME: kserve-localmodel-controller

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Run tests
run: |
if [ -f docker-compose.test.yml ]; then
docker-compose --file docker-compose.test.yml build
docker-compose --file docker-compose.test.yml run sut
else
docker buildx build . --file localmodel.Dockerfile
fi
# Push image to GitHub Packages.
# See also https://docs.docker.com/docker-hub/builds/
push:
# Ensure test job passes before pushing image.
needs: test

runs-on: ubuntu-latest
if: github.event_name == 'push'

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
# [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo VERSION=$VERSION >> $GITHUB_ENV
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/s390x
context: .
file: localmodel.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}
# https://github.com/docker/buildx/issues/1533
provenance: false
Loading

0 comments on commit 733c1c3

Please sign in to comment.