From 095839ba1bc6f1c29d6336dadf8e00a6ddebfa92 Mon Sep 17 00:00:00 2001 From: lisguo Date: Mon, 5 Aug 2024 10:22:17 -0400 Subject: [PATCH 1/3] Remove check for k8s version dependencies --- .github/workflows/eks-add-on-integ-test.yml | 31 +++++++++++---------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/eks-add-on-integ-test.yml b/.github/workflows/eks-add-on-integ-test.yml index f959b882b..61256f7c7 100644 --- a/.github/workflows/eks-add-on-integ-test.yml +++ b/.github/workflows/eks-add-on-integ-test.yml @@ -81,21 +81,22 @@ jobs: role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }} aws-region: us-west-2 - - name: Confirm EKS Version Support - run: | - if [[ - $(go list -m k8s.io/client-go | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) - || $(go list -m k8s.io/apimachinery | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) - || $(go list -m k8s.io/component-base | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) - || $(go list -m k8s.io/kubectl | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) - ]]; then - echo k8s.io/client-go $(go list -m k8s.io/client-go) is less than ${{ matrix.arrays.k8sVersion }} - echo or k8s.io/apimachinery $(go list -m k8s.io/apimachinery) is less than ${{ matrix.arrays.k8sVersion }} - echo or k8s.io/component-base $(go list -m k8s.io/component-base) is less than ${{ matrix.arrays.k8sVersion }} - echo or k8s.io/kubectl $(go list -m k8s.io/kubectl) is less than ${{ matrix.arrays.k8sVersion }}, fail test - echo "please run go get -u && go mod tidy" - exit 1; - fi +# Upstream opentelemetry-operator does not comply with k8s version dependencies for new k8s version support +# - name: Confirm EKS Version Support +# run: | +# if [[ +# $(go list -m k8s.io/client-go | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) +# || $(go list -m k8s.io/apimachinery | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) +# || $(go list -m k8s.io/component-base | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) +# || $(go list -m k8s.io/kubectl | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) +# ]]; then +# echo k8s.io/client-go $(go list -m k8s.io/client-go) is less than ${{ matrix.arrays.k8sVersion }} +# echo or k8s.io/apimachinery $(go list -m k8s.io/apimachinery) is less than ${{ matrix.arrays.k8sVersion }} +# echo or k8s.io/component-base $(go list -m k8s.io/component-base) is less than ${{ matrix.arrays.k8sVersion }} +# echo or k8s.io/kubectl $(go list -m k8s.io/kubectl) is less than ${{ matrix.arrays.k8sVersion }}, fail test +# echo "please run go get -u && go mod tidy" +# exit 1; +# fi - name: Verify Terraform version run: terraform --version From 7e32312c9fc032fca23339444a0d894ee38ac098 Mon Sep 17 00:00:00 2001 From: lisguo Date: Mon, 5 Aug 2024 11:38:48 -0400 Subject: [PATCH 2/3] Echo a warning message instead of failing the test --- .github/workflows/eks-add-on-integ-test.yml | 31 ++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/.github/workflows/eks-add-on-integ-test.yml b/.github/workflows/eks-add-on-integ-test.yml index 61256f7c7..f87af3790 100644 --- a/.github/workflows/eks-add-on-integ-test.yml +++ b/.github/workflows/eks-add-on-integ-test.yml @@ -81,22 +81,21 @@ jobs: role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }} aws-region: us-west-2 -# Upstream opentelemetry-operator does not comply with k8s version dependencies for new k8s version support -# - name: Confirm EKS Version Support -# run: | -# if [[ -# $(go list -m k8s.io/client-go | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) -# || $(go list -m k8s.io/apimachinery | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) -# || $(go list -m k8s.io/component-base | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) -# || $(go list -m k8s.io/kubectl | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) -# ]]; then -# echo k8s.io/client-go $(go list -m k8s.io/client-go) is less than ${{ matrix.arrays.k8sVersion }} -# echo or k8s.io/apimachinery $(go list -m k8s.io/apimachinery) is less than ${{ matrix.arrays.k8sVersion }} -# echo or k8s.io/component-base $(go list -m k8s.io/component-base) is less than ${{ matrix.arrays.k8sVersion }} -# echo or k8s.io/kubectl $(go list -m k8s.io/kubectl) is less than ${{ matrix.arrays.k8sVersion }}, fail test -# echo "please run go get -u && go mod tidy" -# exit 1; -# fi + - name: Confirm EKS Version Support + run: | + if [[ + $(go list -m k8s.io/client-go | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) + || $(go list -m k8s.io/apimachinery | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) + || $(go list -m k8s.io/component-base | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) + || $(go list -m k8s.io/kubectl | cut -d ' ' -f 2 | cut -d '.' -f 2) -lt $( echo ${{ matrix.arrays.k8sVersion }} | cut -d '.' -f 2) + ]]; then + echo k8s.io/client-go $(go list -m k8s.io/client-go) is less than ${{ matrix.arrays.k8sVersion }} + echo or k8s.io/apimachinery $(go list -m k8s.io/apimachinery) is less than ${{ matrix.arrays.k8sVersion }} + echo or k8s.io/component-base $(go list -m k8s.io/component-base) is less than ${{ matrix.arrays.k8sVersion }} + echo or k8s.io/kubectl $(go list -m k8s.io/kubectl) is less than ${{ matrix.arrays.k8sVersion }} + echo "[WARNING] Kubernetes dependencies are lower than the latest Kubernetes cluster version. Please check changelog to ensure no breaking changes: https://kubernetes.io/releases/" + exit 1; + fi - name: Verify Terraform version run: terraform --version From 8debdbd4d0492b0ab6e4e5ca12fdb4cb4e84d7ed Mon Sep 17 00:00:00 2001 From: lisguo Date: Mon, 5 Aug 2024 12:15:17 -0400 Subject: [PATCH 3/3] Remove exit --- .github/workflows/eks-add-on-integ-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/eks-add-on-integ-test.yml b/.github/workflows/eks-add-on-integ-test.yml index f87af3790..d16388c77 100644 --- a/.github/workflows/eks-add-on-integ-test.yml +++ b/.github/workflows/eks-add-on-integ-test.yml @@ -94,7 +94,6 @@ jobs: echo or k8s.io/component-base $(go list -m k8s.io/component-base) is less than ${{ matrix.arrays.k8sVersion }} echo or k8s.io/kubectl $(go list -m k8s.io/kubectl) is less than ${{ matrix.arrays.k8sVersion }} echo "[WARNING] Kubernetes dependencies are lower than the latest Kubernetes cluster version. Please check changelog to ensure no breaking changes: https://kubernetes.io/releases/" - exit 1; fi - name: Verify Terraform version