Skip to content

Commit b14d4f1

Browse files
authored
Merge pull request #4267 from red-hat-data-services/main
Sync rhoai-3.4ea2 from main
2 parents ad00d16 + fa6612d commit b14d4f1

File tree

200 files changed

+25568
-1528
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+25568
-1528
lines changed

.github/renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>red-hat-data-services/konflux-central//renovate/default-renovate.json"
5+
]
6+
}

.github/workflows/agent-docker-publish.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ jobs:
3939
steps:
4040
- name: Checkout source
4141
uses: actions/checkout@v4
42-
42+
43+
- name: Merge target branch
44+
if: github.event_name == 'pull_request'
45+
run: |
46+
git fetch --unshallow origin
47+
git fetch origin ${{ github.event.pull_request.base.ref }}
48+
git config user.email "ci@kserve.io"
49+
git config user.name "CI Bot"
50+
git merge --no-edit origin/${{ github.event.pull_request.base.ref }}
51+
4352
- name: Free-up disk space
4453
uses: ./.github/actions/free-up-disk-space
4554

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Build llmisvc-controller image
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
- release-v*
10+
tags:
11+
- 'odh-v*'
12+
pull_request:
13+
branches:
14+
- main
15+
- master
16+
- release-v*
17+
18+
env:
19+
IMAGE_NAME: "odh-kserve-llmisvc-controller"
20+
REPO_NAME: "opendatahub-io/kserve"
21+
REGISTRY_NAME: "ghcr.io"
22+
23+
jobs:
24+
build-pr:
25+
if: github.event_name == 'pull_request'
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Build llmisvc-controller image
36+
uses: docker/build-push-action@v6
37+
with:
38+
platforms: linux/amd64
39+
context: .
40+
file: llmisvc-controller.Dockerfile
41+
push: false
42+
build-args: |
43+
GOTAGS=distro
44+
cache-from: type=gha
45+
cache-to: type=gha,mode=max
46+
47+
build-push:
48+
if: github.event_name != 'pull_request'
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
55+
- name: Setup QEMU
56+
uses: docker/setup-qemu-action@v3
57+
58+
- name: Setup Docker Buildx
59+
uses: docker/setup-buildx-action@v3
60+
61+
- name: Login to GHCR
62+
uses: docker/login-action@v3
63+
with:
64+
registry: ghcr.io
65+
username: ${{ github.actor }}
66+
password: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Set Docker Tag
69+
run: |
70+
SHA=$(git rev-parse --short HEAD)
71+
echo "SHA_TAG=${SHA}" >> $GITHUB_ENV
72+
73+
if [[ "${GITHUB_REF}" == refs/heads/* ]]; then
74+
TAG="${GITHUB_REF#refs/heads/}"
75+
echo "TAG=${TAG}" >> $GITHUB_ENV
76+
elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then
77+
TAG="${GITHUB_REF#refs/tags/}"
78+
echo "TAG=${TAG}" >> $GITHUB_ENV
79+
else
80+
echo "Ref is not a branch or tag. Image can't be pushed. Please check and try again!!"
81+
exit 1
82+
fi
83+
84+
- name: Build and push llmisvc-controller image
85+
uses: docker/build-push-action@v6
86+
with:
87+
# TODO enable other platforms
88+
# platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
89+
platforms: linux/amd64
90+
context: .
91+
file: llmisvc-controller.Dockerfile
92+
push: true
93+
tags: |
94+
${{ env.REGISTRY_NAME }}/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:${{ env.TAG }}
95+
${{ env.REGISTRY_NAME }}/${{ env.REPO_NAME }}/${{ env.IMAGE_NAME }}:${{ env.SHA_TAG }}
96+
build-args: |
97+
GOTAGS=distro
98+
cache-from: type=gha
99+
cache-to: type=gha,mode=max

.github/workflows/comment-cherry-pick.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,47 @@ on:
55
types: [created]
66

77
jobs:
8+
validate:
9+
name: Validate Cherry Pick Request
10+
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && (github.event.comment.author_association == 'OWNER' || github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'CONTRIBUTOR')
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check if PR is merged
15+
env:
16+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
run: |
18+
PR_NUMBER="${{ github.event.issue.number }}"
19+
PR_STATE=$(gh pr view "$PR_NUMBER" --json state -q .state)
20+
PR_MERGED=$(gh pr view "$PR_NUMBER" --json mergedAt -q .mergedAt)
21+
22+
if [[ "$PR_STATE" != "MERGED" ]] || [[ "$PR_MERGED" == "null" ]]; then
23+
echo "❌ Error: PR #$PR_NUMBER is not merged yet"
24+
echo " Current state: $PR_STATE"
25+
echo " Cherry-pick can only be performed on merged PRs"
26+
exit 1
27+
fi
28+
29+
echo "✅ PR #$PR_NUMBER is merged"
30+
831
cherry-pick:
9-
1032
name: Cherry Pick
11-
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/cherry-pick') && github.event.comment.author_association == 'CONTRIBUTOR'
33+
needs: validate
1234
runs-on: ubuntu-latest
1335

1436
steps:
1537
- name: Checkout the latest code
16-
uses: actions/checkout@v2
38+
uses: actions/checkout@v4
1739
with:
1840
token: ${{ secrets.GITHUB_TOKEN }}
19-
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
41+
fetch-depth: 0
42+
43+
- name: Fetch PR commits
44+
run: |
45+
PR_NUMBER="${{ github.event.issue.number }}"
46+
echo "Fetching PR #$PR_NUMBER commits"
47+
git fetch origin "pull/$PR_NUMBER/head:pr-$PR_NUMBER"
48+
2049
- name: Automatic Cherry Pick
2150
uses: hianhianhian/gha-cherry-pick@master
2251
env:

.github/workflows/e2e-test-llmisvc.yaml

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ jobs:
3535
install_methods: ${{ steps.set-matrix.outputs.install_methods }}
3636
steps:
3737
- uses: actions/checkout@v4
38+
- name: Merge target branch
39+
if: github.event_name == 'pull_request'
40+
run: |
41+
git fetch --unshallow origin
42+
git fetch origin ${{ github.event.pull_request.base.ref }}
43+
git config user.email "ci@kserve.io"
44+
git config user.name "CI Bot"
45+
git merge --no-edit origin/${{ github.event.pull_request.base.ref }}
3846
- uses: dorny/paths-filter@v3
3947
id: filter
4048
with:
@@ -63,6 +71,15 @@ jobs:
6371
- name: Checkout source
6472
uses: actions/checkout@v4
6573

74+
- name: Merge target branch
75+
if: github.event_name == 'pull_request'
76+
run: |
77+
git fetch --unshallow origin
78+
git fetch origin ${{ github.event.pull_request.base.ref }}
79+
git config user.email "ci@kserve.io"
80+
git config user.name "CI Bot"
81+
git merge --no-edit origin/${{ github.event.pull_request.base.ref }}
82+
6683
- name: Load KServe environment variables
6784
run: ./kserve-images.sh --ci
6885

@@ -109,6 +126,15 @@ jobs:
109126
- name: Checkout source
110127
uses: actions/checkout@v4
111128

129+
- name: Merge target branch
130+
if: github.event_name == 'pull_request'
131+
run: |
132+
git fetch --unshallow origin
133+
git fetch origin ${{ github.event.pull_request.base.ref }}
134+
git config user.email "ci@kserve.io"
135+
git config user.name "CI Bot"
136+
git merge --no-edit origin/${{ github.event.pull_request.base.ref }}
137+
112138
- name: Load KServe environment variables
113139
run: ./kserve-images.sh --ci
114140

@@ -203,7 +229,7 @@ jobs:
203229
run: |
204230
# Run only CPU tests for now using pytest markers (cluster_)
205231
# Available GPU vendors: amd, nvidia, intel
206-
./test/scripts/gh-actions/run-e2e-tests.sh "llminferenceservice and cluster_cpu" 1 "envoy-gateway"
232+
./test/scripts/gh-actions/run-e2e-tests.sh "llminferenceservice and cluster_cpu" 0 "envoy-gateway"
207233
208234
- name: Check system status
209235
if: always()
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
name: xKS E2E Tests (KinD odh-xks)
2+
3+
on:
4+
pull_request:
5+
branches: [master, release*]
6+
paths:
7+
- "pkg/apis/**"
8+
- "pkg/controller/**"
9+
- "config/**"
10+
- "test/e2e/llmisvc/**"
11+
- "!.github/**"
12+
- "!docs/**"
13+
- "!**.md"
14+
- ".github/workflows/e2e-test-odh-xks-kind.yml"
15+
workflow_dispatch:
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
test-odh-xks-kind:
23+
runs-on: ubuntu-22.04
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
istio-version: ["1.27.5", "1.28.3"]
28+
name: test-odh-xks-kind (istio-${{ matrix.istio-version }})
29+
steps:
30+
- name: Checkout source
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Merge target branch
36+
run: |
37+
git fetch origin ${{ github.base_ref }}
38+
git merge origin/${{ github.base_ref }} --no-edit
39+
40+
- name: Free-up disk space
41+
uses: ./.github/actions/free-up-disk-space
42+
43+
- name: Setup Go
44+
uses: actions/setup-go@v5
45+
with:
46+
go-version-file: go.mod
47+
48+
- name: Setup Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.12"
52+
53+
- name: Install KinD
54+
run: |
55+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64
56+
chmod +x ./kind
57+
sudo mv ./kind /usr/local/bin/kind
58+
kind version
59+
60+
- name: Install kubectl
61+
run: |
62+
curl -LO "https://dl.k8s.io/release/v1.32.0/bin/linux/amd64/kubectl"
63+
chmod +x ./kubectl
64+
sudo mv ./kubectl /usr/local/bin/kubectl
65+
kubectl version --client
66+
67+
- name: Install kustomize
68+
run: |
69+
curl -LO "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.7.1/kustomize_v5.7.1_linux_amd64.tar.gz"
70+
tar xzf kustomize_v5.7.1_linux_amd64.tar.gz
71+
chmod +x kustomize
72+
sudo mv kustomize /usr/local/bin/
73+
kustomize version
74+
75+
- name: Install cloud-provider-kind
76+
run: |
77+
go install sigs.k8s.io/cloud-provider-kind@latest
78+
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
79+
80+
- name: Start cloud-provider-kind
81+
run: |
82+
# Start in background before cluster creation
83+
nohup cloud-provider-kind > /tmp/cloud-provider-kind.log 2>&1 &
84+
echo "cloud-provider-kind started in background (PID: $!)"
85+
86+
- name: Run setup-odh-xks.sh
87+
env:
88+
ISTIO_VERSION: ${{ matrix.istio-version }}
89+
run: |
90+
# Script creates KinD cluster, installs deps, builds & loads controller, deploys overlay
91+
./test/scripts/kind/setup-odh-xks.sh
92+
93+
- name: Install UV
94+
run: ./test/scripts/gh-actions/setup-uv.sh
95+
96+
- name: Install Python SDK
97+
run: |
98+
pushd python/kserve
99+
uv sync --group test
100+
popd
101+
102+
- name: Run E2E tests
103+
timeout-minutes: 40
104+
env:
105+
SKIP_DELETION_ON_FAILURE: "true"
106+
TOKEN_AUDIENCES: "https://kubernetes.default.svc"
107+
GATEWAY_CLASS_NAME: "istio"
108+
run: |
109+
./test/scripts/gh-actions/run-e2e-tests.sh "llminferenceservice and cluster_cpu and not auth and not custom_gateway" 1 "istio-gatewayapi-ext"
110+
111+
- name: Check system status
112+
if: always()
113+
run: |
114+
./test/scripts/gh-actions/status-check.sh
115+
116+
- name: Collect logs on failure
117+
if: failure()
118+
run: |
119+
echo "=== LLMISVC Controller logs ==="
120+
kubectl logs -n opendatahub -l control-plane=llmisvc-controller-manager --tail=500 2>/dev/null || echo "No controller logs"
121+
echo ""
122+
echo "=== Istio logs ==="
123+
kubectl logs -n istio-system -l app=istiod --tail=200 2>/dev/null || echo "No istiod logs"
124+
echo ""
125+
echo "=== Gateway pod logs ==="
126+
kubectl logs -n opendatahub -l gateway.networking.k8s.io/gateway-name=inference-gateway --tail=200 2>/dev/null || echo "No gateway logs"
127+
echo ""
128+
echo "=== cloud-provider-kind logs ==="
129+
cat /tmp/cloud-provider-kind.log 2>/dev/null || echo "No cloud-provider-kind logs"

0 commit comments

Comments
 (0)