Skip to content

Commit 2acede4

Browse files
authored
Merge pull request #1 from project-codeflare/RHOAIENG-24150
RHOAIENG-24150: e2e kuberay upgrade
2 parents 94c13ac + 737d850 commit 2acede4

File tree

1 file changed

+74
-4
lines changed

1 file changed

+74
-4
lines changed

.github/workflows/kuberay-upgrade.yml

Lines changed: 74 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,78 @@ jobs:
1010
permissions:
1111
contents: read
1212
steps:
13-
- name: dummy test
13+
- name: Clone KubeRay repository
1414
run: |
15-
sleep 60 # test success
16-
# # sleep 300 # test failure
17-
# # exit 1 # test failure
15+
git clone --depth=1 --branch dev https://github.com/opendatahub-io/kuberay.git
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v5
19+
with:
20+
cache: false
21+
go-version: '1.24'
22+
23+
- name: Install go dependencies
24+
run: |
25+
ls
26+
cd ${{ github.workspace }}/kuberay/ray-operator
27+
go mod download
28+
29+
- name: Install helm
30+
run: |
31+
curl -Lo helm.tar.gz https://get.helm.sh/helm-v3.12.2-linux-amd64.tar.gz
32+
tar -zxvf helm.tar.gz
33+
mv linux-amd64/helm /usr/local/bin/helm
34+
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
35+
helm repo update
36+
37+
- name: Install kind
38+
run: go install sigs.k8s.io/kind@latest
39+
40+
- name: Create Kind Cluster
41+
run: kind create cluster
42+
43+
- name: Set kubectl context
44+
run: kubectl cluster-info --context kind-kind
45+
46+
- name: Install Older KubeRay Operator (v1.3.2)
47+
run: |
48+
helm repo add kuberay https://ray-project.github.io/kuberay-helm/
49+
helm install kuberay-operator kuberay/kuberay-operator --version 1.3.2
50+
51+
- name: Wait for Kuberay Operator to be available
52+
run: kubectl wait --timeout=90s --for=condition=Available=true deployment -n default kuberay-operator
53+
54+
- name: Prepare and Run Upgrade Tests
55+
run: |
56+
cd kuberay/ray-operator
57+
echo "--- START:Running e2e Operator upgrade (v1.3.2 to v1.4.0 operator) tests"
58+
KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m KUBERAY_TEST_UPGRADE_IMAGE=v1.4.0 \
59+
go test -timeout 30m -v ./test/e2eupgrade
60+
echo "--- END:e2e Operator upgrade (v1.3.2 to v1.4.0 operator) tests finished"
61+
62+
- name: Debug Kubernetes Cluster on Failure
63+
if: failure()
64+
run: |
65+
echo "--- DEBUG OUTPUT ---"
66+
echo "Checking GitHub Runner resources..."
67+
lscpu
68+
free -h
69+
echo "Checking Kubernetes cluster state..."
70+
kubectl cluster-info
71+
kubectl get nodes
72+
73+
echo "Describing all nodes..."
74+
kubectl describe nodes
75+
echo "Printing all Kubernetes events..."
76+
kubectl get events -A
77+
echo "Getting logs of Kind control plane container..."
78+
docker logs kind-control-plane
79+
echo "--- END OF DEBUG OUTPUT ---"
80+
- name: Display all pods on kind cluster
81+
if: failure()
82+
run: kubectl get pods -A
83+
84+
- name: Cleanup
85+
if: always()
86+
run: kind delete clusters --all || true
87+

0 commit comments

Comments
 (0)