Skip to content

Commit

Permalink
Merge pull request ray-project#49 from red-hat-data-services/Mohammad…
Browse files Browse the repository at this point in the history
…iIram-patch-5

Update renovate.json to poin to main
  • Loading branch information
MohammadiIram authored and oksanabaza committed Dec 3, 2024
2 parents c8fd61f + c5f7095 commit 12f9b8b
Show file tree
Hide file tree
Showing 428 changed files with 34,768 additions and 11,176 deletions.
93 changes: 71 additions & 22 deletions .buildkite/test-sample-yamls.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#ci:group=:yaml: Sample YAML tests

- label: 'Test RayCluster Sample YAMLs (nightly operator)'
# TODO: Remove deprecated tests after migrating to Go tests
- label: '(Deprecated) Test RayCluster Sample YAMLs (nightly operator)'
instance_size: large
image: golang:1.22.2
image: golang:1.22
commands:
- ./.buildkite/setup-env.sh
# Build nightly KubeRay operator image
Expand All @@ -12,17 +13,17 @@
# Use nightly KubeRay operator image
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=kuberay/operator:nightly python3 tests/test_sample_raycluster_yamls.py

- label: 'Test RayCluster Sample YAMLs (latest release)'
- label: '(Deprecated) Test RayCluster Sample YAMLs (latest release)'
instance_size: large
image: golang:1.22.2
image: golang:1.22
commands:
- ./.buildkite/setup-env.sh
# Use KubeRay operator image from the latest release
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=quay.io/kuberay/operator:v1.0.0 python3 tests/test_sample_raycluster_yamls.py
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=quay.io/kuberay/operator:v1.1.0 python3 tests/test_sample_raycluster_yamls.py

- label: 'Test RayJob Sample YAMLs (nightly operator)'
- label: '(Deprecated) Test RayJob Sample YAMLs (nightly operator)'
instance_size: large
image: golang:1.22.2
image: golang:1.22
commands:
- ./.buildkite/setup-env.sh
# Build nightly KubeRay operator image
Expand All @@ -32,17 +33,17 @@
# Use nightly KubeRay operator image
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=kuberay/operator:nightly python3 tests/test_sample_rayjob_yamls.py

- label: 'Test RayJob Sample YAMLs (latest release)'
- label: '(Deprecated) Test RayJob Sample YAMLs (latest release)'
instance_size: large
image: golang:1.22.2
image: golang:1.22
commands:
- ./.buildkite/setup-env.sh
# Use KubeRay operator image from the latest release
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=quay.io/kuberay/operator:v1.0.0 python3 tests/test_sample_rayjob_yamls.py
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=quay.io/kuberay/operator:v1.1.0 python3 tests/test_sample_rayjob_yamls.py

- label: 'Test RayService Sample YAMLs (nightly operator)'
- label: '(Deprecated) Test RayService Sample YAMLs (nightly operator)'
instance_size: large
image: golang:1.22.2
image: golang:1.22
commands:
- ./.buildkite/setup-env.sh
# Build nightly KubeRay operator image
Expand All @@ -52,14 +53,62 @@
# Use nightly KubeRay operator image
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=kuberay/operator:nightly python3 tests/test_sample_rayservice_yamls.py

# TODO (kevin85421): #1864 introduces new labels to associate RayService CR with its Kubernetes Service.
# Hence, the test logic is not compatible with the latest release. We comment out the test for now, and
# will re-enable it once KubeRay v1.1.0 is out.
- label: '(Deprecated) Test RayService Sample YAMLs (latest release)'
instance_size: large
image: golang:1.22
commands:
- ./.buildkite/setup-env.sh
# Use KubeRay operator image from the latest release
- source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=quay.io/kuberay/operator:v1.1.0 python3 tests/test_sample_rayservice_yamls.py

- label: 'Test Autoscaler E2E (nightly operator)'
instance_size: large
image: golang:1.22
commands:
- source .buildkite/setup-env.sh
- kind create cluster --wait 900s --config ./tests/framework/config/kind-config-buildkite.yml
- kubectl config set clusters.kind-kind.server https://docker:6443
# Build nightly KubeRay operator image
- pushd ray-operator
- IMG=kuberay/operator:nightly make docker-image
- kind load docker-image kuberay/operator:nightly
- IMG=kuberay/operator:nightly make deploy
- kubectl wait --timeout=90s --for=condition=Available=true deployment -n ray-system kuberay-operator
# Run e2e tests
- KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m go test -timeout 30m -v ./test/e2eautoscaler
# Printing KubeRay operator logs
- kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay

# - label: 'Test RayService Sample YAMLs (latest release)'
# instance_size: large
# image: golang:1.20
# commands:
# - ./.buildkite/setup-env.sh
# # Use KubeRay operator image from the latest release
# - source .venv/bin/activate && BUILDKITE_ENV=true OPERATOR_IMAGE=quay.io/kuberay/operator:v1.0.0 python3 tests/test_sample_rayservice_yamls.py
#- label: 'Test Sample YAMLs (nightly operator)'
# instance_size: large
# image: golang:1.22
# commands:
# - source .buildkite/setup-env.sh
# - kind create cluster --wait 900s --config ./tests/framework/config/kind-config-buildkite.yml
# - kubectl config set clusters.kind-kind.server https://docker:6443
# # Build nightly KubeRay operator image
# - pushd ray-operator
# - IMG=kuberay/operator:nightly make docker-image
# - kind load docker-image kuberay/operator:nightly
# - IMG=kuberay/operator:nightly make deploy
# - kubectl wait --timeout=90s --for=condition=Available=true deployment -n ray-system kuberay-operator
# # Run sample YAML tests
# - KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m go test -timeout 30m -v ./test/sampleyaml
# # Printing KubeRay operator logs
# - kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay
#
#- label: 'Test Sample YAMLs (latest release)'
# instance_size: large
# image: golang:1.22
# commands:
# - source .buildkite/setup-env.sh
# - kind create cluster --wait 900s --config ./tests/framework/config/kind-config-buildkite.yml
# - kubectl config set clusters.kind-kind.server https://docker:6443
# # Deploy KubeRay operator
# - pushd ray-operator
# - IMG=quay.io/kuberay/operator:v1.1.0 make deploy
# - kubectl wait --timeout=90s --for=condition=Available=true deployment -n ray-system kuberay-operator
# # Run sample YAML tests
# - KUBERAY_TEST_TIMEOUT_SHORT=1m KUBERAY_TEST_TIMEOUT_MEDIUM=5m KUBERAY_TEST_TIMEOUT_LONG=10m go test -timeout 30m -v ./test/sampleyaml
# # Printing KubeRay operator logs
# - kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
attributes:
value: |
Thank you for reporting the problem!
Please make sure what you are reporting is a bug with reproducible steps.
Please make sure what you are reporting is a bug with reproducible steps.
- type: checkboxes
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## Checks

- [ ] I've made sure the tests are passing.
- [ ] I've made sure the tests are passing.
- Testing Strategy
- [ ] Unit tests
- [ ] Manual tests
Expand Down
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"config:recommended"
],
"branchPrefix": "renovate/",
"baseBranches": ["dev", "rhoai-2.16"],
"baseBranches": ["main", "rhoai-2.16"],
"ignoreTests": true,
"automergeType": "pr",
"automerge": true,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/compatibility/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ runs:
uses: docker-practice/actions-setup-docker@master

- name: Download Artifact Operator
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: operator_img
path: /tmp
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/consistency-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/setup-go@v3
with:
# Use the same go version with build job
go-version: '1.22.2'
go-version: v1.22

- name: Check golang version
working-directory: ./ray-operator
Expand All @@ -44,11 +44,11 @@ jobs:
with:
fetch-depth: 0

- name: Set up Go 1.19.x
uses: actions/setup-go@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
# Use the same go version with build job
go-version: '1.19'
go-version: v1.22

- name: Check golang version
working-directory: ./ray-operator
Expand All @@ -69,10 +69,10 @@ jobs:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
# Use the same go version with build job
go-version: '1.22.2'
go-version: v1.22

- name: Update CRD/RBAC YAML files
working-directory: ./ray-operator
Expand Down
92 changes: 92 additions & 0 deletions .github/workflows/e2e-tests-reusable-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: e2e test reusable workflow

on:
workflow_call:
inputs:
plugin-test:
required: true
type: boolean
dir-to-test:
required: true
type: string

jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: v1.22

- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup and start KinD cluster
uses: ./.github/workflows/actions/kind

- name: Build CLI and Add to PATH
if: inputs.plugin-test
run: |
cd ./kubectl-plugin
go mod download
go build -o kubectl-ray -a ./cmd/kubectl-ray.go
cp ./kubectl-ray /usr/local/bin
- name: Deploy Kuberay operator
id: deploy
run: |
echo Deploying Kuberay operator
cd ray-operator
IMG="${REGISTRY_ADDRESS}"/kuberay
make docker-build -e IMG="${IMG}" -e ENGINE=podman
make docker-push -e IMG="${IMG}" -e ENGINE=podman
make deploy -e IMG="${IMG}"
kubectl wait --timeout=90s --for=condition=Available=true deployment -n ray-system kuberay-operator
- name: Deploy Kuberay Cluster
if: inputs.plugin-test
run: |
echo Deploying Kuberay cluster
kubectl apply -f ./ray-operator/config/samples/ray-cluster.sample.yaml
kubectl wait --timeout=300s --for=condition=ready pod -l ray.io/cluster=raycluster-sample
- name: Run e2e tests
run: |
export KUBERAY_TEST_TIMEOUT_SHORT=1m
export KUBERAY_TEST_TIMEOUT_MEDIUM=5m
export KUBERAY_TEST_TIMEOUT_LONG=10m
export KUBERAY_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }}
echo "KUBERAY_TEST_OUTPUT_DIR=${KUBERAY_TEST_OUTPUT_DIR}" >> $GITHUB_ENV
set -euo pipefail
cd ${{ inputs.dir-to-test }}
go test -timeout 30m -v ./test/e2e -json 2>&1 | tee ${KUBERAY_TEST_OUTPUT_DIR}/gotest.log | gotestfmt
- name: Print KubeRay operator logs
if: (!inputs.plugin-test) && always() && steps.deploy.outcome == 'success'
run: |
echo "Printing KubeRay operator logs"
kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay | tee ${KUBERAY_TEST_OUTPUT_DIR}/kuberay-operator.log
- name: Upload logs
uses: actions/upload-artifact@v4
if: (!inputs.plugin-test) && always() && steps.deploy.outcome == 'success'
with:
name: logs
retention-days: 10
path: |
${{ env.KUBERAY_TEST_OUTPUT_DIR }}/**/*.log
74 changes: 10 additions & 64 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- 'release-*'
paths-ignore:
- 'apiserver/**'
- 'cli/**'
- 'docs/**'
- '**.adoc'
- '**.md'
Expand All @@ -18,7 +17,6 @@ on:
- 'release-*'
paths-ignore:
- 'apiserver/**'
- 'cli/**'
- 'docs/**'
- '**.adoc'
- '**.md'
Expand All @@ -30,65 +28,13 @@ concurrency:

jobs:
ray-operator:

runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: v1.22.2

- name: Set up gotestfmt
uses: gotesttools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Setup and start KinD cluster
uses: ./.github/workflows/actions/kind

- name: Deploy Kuberay operator
id: deploy
run: |
echo Deploying Kuberay operator
cd ray-operator
IMG="${REGISTRY_ADDRESS}"/kuberay
make docker-build -e IMG="${IMG}" -e ENGINE=podman
make docker-push -e IMG="${IMG}" -e ENGINE=podman
make deploy -e IMG="${IMG}"
kubectl wait --timeout=90s --for=condition=Available=true deployment -n ray-system kuberay-operator
- name: Run e2e tests
run: |
export KUBERAY_TEST_TIMEOUT_SHORT=1m
export KUBERAY_TEST_TIMEOUT_MEDIUM=5m
export KUBERAY_TEST_TIMEOUT_LONG=10m
export KUBERAY_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }}
echo "KUBERAY_TEST_OUTPUT_DIR=${KUBERAY_TEST_OUTPUT_DIR}" >> $GITHUB_ENV
set -euo pipefail
cd ray-operator
go test -timeout 30m -v ./test/e2e -json 2>&1 | tee ${KUBERAY_TEST_OUTPUT_DIR}/gotest.log | gotestfmt
- name: Print KubeRay operator logs
if: always() && steps.deploy.outcome == 'success'
run: |
echo "Printing KubeRay operator logs"
kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay | tee ${KUBERAY_TEST_OUTPUT_DIR}/kuberay-operator.log
- name: Upload logs
uses: actions/upload-artifact@v3
if: always() && steps.deploy.outcome == 'success'
with:
name: logs
retention-days: 10
path: |
${{ env.KUBERAY_TEST_OUTPUT_DIR }}/**/*.log
uses: ./.github/workflows/e2e-tests-reusable-workflow.yaml
with:
plugin-test: false
dir-to-test: ray-operator

ray-kubectl-plugin:
uses: ./.github/workflows/e2e-tests-reusable-workflow.yaml
with:
plugin-test: true
dir-to-test: kubectl-plugin
Loading

0 comments on commit 12f9b8b

Please sign in to comment.