From 922d0869b61a883c949aeb7c6e3265df12ee9fea Mon Sep 17 00:00:00 2001 From: Paco Xu Date: Tue, 12 Nov 2024 18:33:08 +0800 Subject: [PATCH] fix v1.26 update-codegen --- .github/workflows/verify.yml | 87 +------------------ Makefile | 6 ++ hack/test_cmd_2.sh | 22 +++++ patches/update-kube-proxy-iptables.1.18.patch | 2 +- releases.yml | 53 ++++++----- 5 files changed, 60 insertions(+), 110 deletions(-) create mode 100755 hack/test_cmd_2.sh diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 4d2914b7d2..eef7a13a76 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -371,7 +371,7 @@ jobs: run: | make test-integration - Test-v1-24-6-lts-0: + Test-v1-24-17-lts-0: needs: Patch runs-on: ubuntu-latest steps: @@ -796,91 +796,6 @@ jobs: run: | make test-integration - Test-v1-20-2-lts-2: - needs: Patch - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Cache - uses: actions/cache@v2 - env: - cache-name: src - with: - path: | - src - key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-2-lts-2 - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }} - - name: Install dependent - run: | - make dependent - - name: Checkout to v1.20.2-lts.2 - run: | - make v1.20.2-lts.2 - - name: Install etcd - run: | - make install-etcd - - name: Test - run: | - make test - - Test-Cmd-v1-20-2-lts-2: - needs: Patch - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Cache - uses: actions/cache@v2 - env: - cache-name: src - with: - path: | - src - key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-2-lts-2 - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }} - - name: Install dependent - run: | - make dependent - - name: Checkout to v1.20.2-lts.2 - run: | - make v1.20.2-lts.2 - - name: Install etcd - run: | - make install-etcd - - name: Test cmd - run: | - make test-cmd - - Test-Integration-v1-20-2-lts-2: - needs: Patch - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Cache - uses: actions/cache@v2 - env: - cache-name: src - with: - path: | - src - /tmp/kubernetes-lts/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-v1-20-2-lts-2 - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }} - - name: Install dependent - run: | - make dependent - - name: Checkout to v1.20.2-lts.2 - run: | - make v1.20.2-lts.2 - - name: Install etcd - run: | - make install-etcd - - name: Test integration - run: | - make test-integration - Test-v1-19-16-lts-3: needs: Patch runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 8f34b00f15..2e5e12b6a0 100644 --- a/Makefile +++ b/Makefile @@ -101,10 +101,16 @@ format-all-patch: test: ./hack/test.sh +# before v1.25 .PHONY: test-cmd test-cmd: ./hack/test_cmd.sh +# after v1.26 +.PHONY: test-cmd-2 +test-cmd-2: + ./hack/test_cmd_2.sh + .PHONY: test-integration test-integration: ./hack/test_integration.sh diff --git a/hack/test_cmd_2.sh b/hack/test_cmd_2.sh new file mode 100755 index 0000000000..32c9bfa9ba --- /dev/null +++ b/hack/test_cmd_2.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +set -o errexit +set -o nounset +set -o pipefail + +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. + +source "kit/helper.sh" +cd "${WORKDIR}" + +# Kubeadm was added for testing in 1.19 and later +for n in {1..5}; do + echo "+++ Test retry ${n}" + ./build/shell.sh -c ' + +make all -C "${KUBE_ROOT}" WHAT=cmd/kubeadm +mkdir -p _output/local/go/bin/ && cp _output/dockerized/bin/linux/amd64/kubeadm _output/local/go/bin/ +./hack/install-etcd.sh +PATH=$(pwd)/third_party/etcd:${PATH} make test-cmd +' 2>&1 | grep -v -E '^I\w+ ' && exit 0 +done diff --git a/patches/update-kube-proxy-iptables.1.18.patch b/patches/update-kube-proxy-iptables.1.18.patch index 47e769f300..aef29f02fb 100644 --- a/patches/update-kube-proxy-iptables.1.18.patch +++ b/patches/update-kube-proxy-iptables.1.18.patch @@ -22,7 +22,7 @@ index 70e3874b441..4c67a178517 100644 }, } diff --git a/build/common.sh b/build/common.sh -index 9cd95b5af51..13c15466c39 100755 +index 75dc82ed335..3771dafdaf5 100755 --- a/build/common.sh +++ b/build/common.sh @@ -95,14 +95,14 @@ readonly KUBE_CONTAINER_RSYNC_PORT=8730 diff --git a/releases.yml b/releases.yml index 9e35872d31..75caebed4e 100644 --- a/releases.yml +++ b/releases.yml @@ -49,12 +49,13 @@ releases: - fix-kubectl-convert-97644.1.20 - nokmem.1.20 - - name: v1.20.2-lts.2 - base_release: v1.20.2-ci - must: true - patches: - - fix-kubectl-convert-97644.1.20 - - nokmem.1.20 + # use v1.20.15-lts.2 instead + # - name: v1.20.2-lts.2 + # base_release: v1.20.2-ci + # must: true + # patches: + # - fix-kubectl-convert-97644.1.20 + # - nokmem.1.20 - name: v1.19.16-lts.3 base_release: v1.19.16-ci @@ -64,18 +65,23 @@ releases: - nokmem.1.20 - name: v1.18.20-lts.2 - base_release: v1.18.20-ci + base_release: v1.18.20 must: true patches: - CVE-2020-8554.1.18 - fix-missing-env-91500.1.18 - CVE-2021-25741.1.18 - nokmem.1.20 - - - name: v1.18.20-dce.1 - base_release: v1.18.20-lts.2 - patches: - - update-kube-proxy-iptables.1.18 + + # comments this as dce.1 do not needs to be updated + # - name: v1.18.20-dce.1 + # base_release: release-1.18 + # patches: + # - update-kube-proxy-iptables.1.18 + # - CVE-2020-8554.1.18 + # - fix-missing-env-91500.1.18 + # - CVE-2021-25741.1.18 + # - nokmem.1.20 - name: v1.17.17-lts.2 base_release: v1.17.17-ci @@ -260,17 +266,18 @@ releases: - k8s.io/kubernetes/pkg/volume/csi - k8s.io/kubernetes/pkg/util/oom - - name: v1.20.2-ci - base_release: v1.20.2 - patches: - - fix-run-docker.1.24 - - no-delete-images.1.24 - - fix-etcd-put-key.1.23 - test_failures_tolerated: - - k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler - - k8s.io/kubernetes/pkg/volume/csi - - k8s.io/kubernetes/vendor/k8s.io/kube-aggregator/pkg/apiserver - - k8s.io/kubernetes/pkg/util/oom + # use v1.20.15-ci instead + # - name: v1.20.2-ci + # base_release: v1.20.2 + # patches: + # - fix-run-docker.1.24 + # - no-delete-images.1.24 + # - fix-etcd-put-key.1.23 + # test_failures_tolerated: + # - k8s.io/kubernetes/pkg/kubelet/volumemanager/reconciler + # - k8s.io/kubernetes/pkg/volume/csi + # - k8s.io/kubernetes/vendor/k8s.io/kube-aggregator/pkg/apiserver + # - k8s.io/kubernetes/pkg/util/oom - name: v1.19.16-ci base_release: v1.19.16