From 06a9880b7c31a6f8c90fe821bfc888f8f845be66 Mon Sep 17 00:00:00 2001 From: "kumahq[bot]" <110050114+kumahq[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:57:49 +0000 Subject: [PATCH] test(e2e): reenable amd64 self-hosted runners (backport of #11937) (#12270) Automatic cherry-pick of #11937 for branch release-2.8 Generated by [action](https://github.com/kumahq/kuma/actions/runs/12317112771) cherry-picked commit ca2f6cf355ac0afd6ed52169f6cedf6e3639569d :warning: :warning: :warning: Conflicts happened when cherry-picking! :warning: :warning: :warning: ``` On branch release-2.8 Your branch is up to date with 'origin/release-2.8'. You are currently cherry-picking commit ca2f6cf35. (fix conflicts and run "git cherry-pick --continue") (use "git cherry-pick --skip" to skip this patch) (use "git cherry-pick --abort" to cancel the cherry-pick operation) Changes to be committed: modified: .github/workflows/_e2e.yaml Unmerged paths: (use "git add ..." to mark resolution) both modified: .github/workflows/build-test-distribute.yaml ``` --------- Signed-off-by: Jakub Dyszkiewicz Signed-off-by: Lukasz Dziedziak Signed-off-by: Jay Chen <1180092+jijiechen@users.noreply.github.com> Co-authored-by: Jakub Dyszkiewicz Co-authored-by: Lukasz Dziedziak Co-authored-by: Jay Chen <1180092+jijiechen@users.noreply.github.com> --- .github/workflows/_e2e.yaml | 12 +++++------- .github/workflows/_test.yaml | 5 +++++ .github/workflows/build-test-distribute.yaml | 1 + .../reachableservices/auto_reachable_services_k8s.go | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/_e2e.yaml b/.github/workflows/_e2e.yaml index 999377c310cb..bdba4c6ff786 100644 --- a/.github/workflows/_e2e.yaml +++ b/.github/workflows/_e2e.yaml @@ -4,14 +4,13 @@ on: matrix: required: true type: string - runnersByArch: + runner: type: string - required: false - default: '{"amd64": "ubuntu-latest", "arm64": "ubuntu-latest-arm64-kong"}' + required: true permissions: contents: read env: - CI_TOOLS_DIR: ${{ contains(fromJSON(inputs.runnersByArch)[fromJSON(inputs.matrix).arch], '-kong') && '/work/kuma/kuma/.ci_tools' || '/home/runner/work/kuma/kuma/.ci_tools' }} + CI_TOOLS_DIR: ${{ contains(inputs.runner, '-kong') && '/work/kuma/kuma/.ci_tools' || '/home/runner/work/kuma/kuma/.ci_tools' }} E2E_PARAM_K8S_VERSION: ${{ fromJSON(inputs.matrix).k8sVersion }} E2E_PARAM_CNI_NETWORK_PLUGIN: ${{ fromJSON(inputs.matrix).cniNetworkPlugin }} E2E_PARAM_ARCH: ${{ fromJSON(inputs.matrix).arch }} @@ -22,8 +21,8 @@ env: jobs: e2e: timeout-minutes: 60 - # use the runner from the map, if the runner is circleci or '' then use ubuntu-latest - runs-on: ${{ contains(fromJSON('["circleci", ""]'), fromJSON(inputs.runnersByArch)[fromJSON(inputs.matrix).arch]) && 'ubuntu-latest' || fromJSON(inputs.runnersByArch)[fromJSON(inputs.matrix).arch]}} + runs-on: ${{ inputs.runner }} + if: ${{ inputs.runner != '' }} strategy: fail-fast: false matrix: @@ -74,7 +73,6 @@ jobs: { "ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64", - "dns": ["8.8.8.8"], "dns-search": ["."] } EOF diff --git a/.github/workflows/_test.yaml b/.github/workflows/_test.yaml index d9449a9b4267..bbaf4e0bc4f7 100644 --- a/.github/workflows/_test.yaml +++ b/.github/workflows/_test.yaml @@ -4,6 +4,9 @@ on: FULL_MATRIX: required: true type: string + RUNNERS_BY_ARCH: + required: true + type: string permissions: contents: read env: @@ -105,6 +108,7 @@ jobs: uses: ./.github/workflows/_e2e.yaml with: matrix: ${{ toJSON(matrix) }} + runner: ${{ fromJSON(inputs.RUNNERS_BY_ARCH)[matrix.arch] }} secrets: inherit test_e2e_env: needs: ["gen_e2e_matrix"] @@ -116,4 +120,5 @@ jobs: uses: ./.github/workflows/_e2e.yaml with: matrix: ${{ toJSON(matrix) }} + runner: ${{ fromJSON(inputs.RUNNERS_BY_ARCH)[matrix.arch] }} secrets: inherit diff --git a/.github/workflows/build-test-distribute.yaml b/.github/workflows/build-test-distribute.yaml index b41667e559d2..268c316b9919 100644 --- a/.github/workflows/build-test-distribute.yaml +++ b/.github/workflows/build-test-distribute.yaml @@ -85,6 +85,7 @@ jobs: uses: ./.github/workflows/_test.yaml with: FULL_MATRIX: ${{ needs.check.outputs.FULL_MATRIX }} + RUNNERS_BY_ARCH: ${{ (github.event_name == 'push' || github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) && '{"amd64":"ubuntu-latest-kong","arm64":"ubuntu-latest-arm64-kong"}' || '{"amd64":"ubuntu-latest","arm64":""}' }} secrets: inherit build_publish: permissions: diff --git a/test/e2e/reachableservices/auto_reachable_services_k8s.go b/test/e2e/reachableservices/auto_reachable_services_k8s.go index 2f04714ea256..7410090d2975 100644 --- a/test/e2e/reachableservices/auto_reachable_services_k8s.go +++ b/test/e2e/reachableservices/auto_reachable_services_k8s.go @@ -130,7 +130,7 @@ spec: client.FromKubernetesPod(TestNamespace, "client-server"), ) g.Expect(err).To(Not(HaveOccurred())) - g.Expect(failures.Exitcode).To(Equal(6)) + g.Expect(failures.Exitcode).To(Or(Equal(6), Equal(28))) }, "30s", "1s").Should(Succeed()) // when