From 5cddf56f6d9569d29493d67c9adc842eee38a80b Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Mon, 16 Dec 2024 19:09:02 +0100 Subject: [PATCH 1/5] build: use also different K8s versions for E2E testing in GHA Signed-off-by: Matteo Mortari --- .github/workflows/python-tests.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index cabe5b04..c7aadaa2 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -66,12 +66,22 @@ jobs: fi test: - name: Test against Py ${{ matrix.python }} + name: Test against Py ${{ matrix.python }} and K8s ${{ matrix.kubernetes-version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: python: ["3.12", "3.11", "3.10", "3.9"] + kubernetes-version: ["v1.27.11"] + include: # on main merges (not PRs), use also different K8s versions for E2E testing + - python: "3.12" + kubernetes-version: ${{ github.event_name == 'push' && 'v1.28.7' }} + - python: "3.12" + kubernetes-version: ${{ github.event_name == 'push' && 'v1.29.2' }} + - python: "3.12" + kubernetes-version: ${{ github.event_name == 'push' && 'v1.30.6' }} + exclude: + - kubernetes-version: 'false' env: FORCE_COLOR: "1" IMG_ORG: kubeflow @@ -124,8 +134,9 @@ jobs: - name: Start Kind Cluster uses: helm/kind-action@v1.11.0 with: - node_image: "kindest/node:v1.27.11" + node_image: kindest/node:${{ matrix.kubernetes-version }} cluster_name: chart-testing-py-${{ matrix.python }} + kubectl_version: ${{ matrix.kubernetes-version }} - name: Load Local Registry Test Image env: IMG: "${{ env.IMG_ORG }}/${{ env.IMG_REPO }}:${{ steps.tags.outputs.tag }}" From 7bf5582c49e421814e97b413e7f89c7e6b70c574 Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Mon, 16 Dec 2024 19:52:41 +0100 Subject: [PATCH 2/5] refactor matrix GHA Signed-off-by: Matteo Mortari --- .github/workflows/python-tests.yml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index c7aadaa2..5834aace 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -71,17 +71,19 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.12", "3.11", "3.10", "3.9"] - kubernetes-version: ["v1.27.11"] - include: # on main merges (not PRs), use also different K8s versions for E2E testing - - python: "3.12" - kubernetes-version: ${{ github.event_name == 'push' && 'v1.28.7' }} - - python: "3.12" - kubernetes-version: ${{ github.event_name == 'push' && 'v1.29.2' }} - - python: "3.12" - kubernetes-version: ${{ github.event_name == 'push' && 'v1.30.6' }} - exclude: - - kubernetes-version: 'false' + python: ["3.12"] # see below for versions 3.9-3.11 + kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2", "v1.30.6"] + exclude: # on main merges (not PRs), use also different K8s versions for E2E testing + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.28.7' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.29.2' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.30.6' }} + include: # test Py versions only with a reference K8s version, designated currently to kubernetes-version: v1.27.11 + - python: "3.11" + kubernetes-version: "v1.27.11" + - python: "3.10" + kubernetes-version: "v1.27.11" + - python: "3.9" + kubernetes-version: "v1.27.11" env: FORCE_COLOR: "1" IMG_ORG: kubeflow From ecd87788564e2e955bce79c7fae6b7e578f0392b Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Mon, 16 Dec 2024 22:30:55 +0100 Subject: [PATCH 3/5] demo on PR how it would look on main merges Signed-off-by: Matteo Mortari --- .github/workflows/python-tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 5834aace..3602c280 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -73,10 +73,11 @@ jobs: matrix: python: ["3.12"] # see below for versions 3.9-3.11 kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2", "v1.30.6"] - exclude: # on main merges (not PRs), use also different K8s versions for E2E testing - - kubernetes-version: ${{ github.event_name != 'push' && 'v1.28.7' }} - - kubernetes-version: ${{ github.event_name != 'push' && 'v1.29.2' }} - - kubernetes-version: ${{ github.event_name != 'push' && 'v1.30.6' }} + # DEMO on PR how it would look on main-merges + # exclude: # on main merges (not PRs), use also different K8s versions for E2E testing + # - kubernetes-version: ${{ github.event_name != 'push' && 'v1.28.7' }} + # - kubernetes-version: ${{ github.event_name != 'push' && 'v1.29.2' }} + # - kubernetes-version: ${{ github.event_name != 'push' && 'v1.30.6' }} include: # test Py versions only with a reference K8s version, designated currently to kubernetes-version: v1.27.11 - python: "3.11" kubernetes-version: "v1.27.11" From f41b2cd6899b163d193da58fde616ce51110d4ec Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Mon, 16 Dec 2024 22:33:39 +0100 Subject: [PATCH 4/5] revert as intentended on PR Revert "demo on PR how it would look on main merges" This reverts commit ecd87788564e2e955bce79c7fae6b7e578f0392b. Signed-off-by: Matteo Mortari --- .github/workflows/python-tests.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 3602c280..5834aace 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -73,11 +73,10 @@ jobs: matrix: python: ["3.12"] # see below for versions 3.9-3.11 kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2", "v1.30.6"] - # DEMO on PR how it would look on main-merges - # exclude: # on main merges (not PRs), use also different K8s versions for E2E testing - # - kubernetes-version: ${{ github.event_name != 'push' && 'v1.28.7' }} - # - kubernetes-version: ${{ github.event_name != 'push' && 'v1.29.2' }} - # - kubernetes-version: ${{ github.event_name != 'push' && 'v1.30.6' }} + exclude: # on main merges (not PRs), use also different K8s versions for E2E testing + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.28.7' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.29.2' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.30.6' }} include: # test Py versions only with a reference K8s version, designated currently to kubernetes-version: v1.27.11 - python: "3.11" kubernetes-version: "v1.27.11" From 6f72bfd043a9f47d3402630a16bf758a28991244 Mon Sep 17 00:00:00 2001 From: Matteo Mortari Date: Wed, 18 Dec 2024 17:27:48 +0100 Subject: [PATCH 5/5] add K8s version on suggestion by Andrey Signed-off-by: Matteo Mortari --- .github/workflows/python-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index 5834aace..360a33bf 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -72,11 +72,12 @@ jobs: fail-fast: false matrix: python: ["3.12"] # see below for versions 3.9-3.11 - kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2", "v1.30.6"] + kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2", "v1.30.6", "v1.31.0"] exclude: # on main merges (not PRs), use also different K8s versions for E2E testing - kubernetes-version: ${{ github.event_name != 'push' && 'v1.28.7' }} - kubernetes-version: ${{ github.event_name != 'push' && 'v1.29.2' }} - kubernetes-version: ${{ github.event_name != 'push' && 'v1.30.6' }} + - kubernetes-version: ${{ github.event_name != 'push' && 'v1.31.0' }} include: # test Py versions only with a reference K8s version, designated currently to kubernetes-version: v1.27.11 - python: "3.11" kubernetes-version: "v1.27.11"