From f8795726b6594396d73a65e59c93c125f77a27c0 Mon Sep 17 00:00:00 2001 From: "tao.yang" Date: Mon, 13 May 2024 09:57:41 +0800 Subject: [PATCH 1/3] optimizate upgrade Signed-off-by: ty-dc --- .github/workflows/auto-upgrade-ci.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index b286d30276..46d2526728 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -121,6 +121,17 @@ jobs: run: | ref=$( git show -s --format='format:%H') echo "RUN_REF=${ref}" >> $GITHUB_ENV + if ${{ github.event_name == 'push' }} ; then + echo "trigger by push" + echo "NEW_VERSION=${{ github.sha }}" >> $GITHUB_ENV + # for PR scenarios, the latest version of the main branch will be used as old-version + echo "OLD_VERSION=main" >> $GITHUB_ENV + elif ${{ github.event_name == 'pull_request_target' }} ; then + echo "trigger by pull_request_target" + echo "NEW_VERSION=${{ github.sha }}" >> $GITHUB_ENV + # for PR scenarios, the latest version of the main branch will be used as old-version + echo "OLD_VERSION=main" >> $GITHUB_ENV + fi call_build_ci_image: needs: [get_ref] From bd5855730c01d2e7e1afcac3157953fc8068fadc Mon Sep 17 00:00:00 2001 From: ty-dc Date: Wed, 12 Jun 2024 17:41:28 +0800 Subject: [PATCH 2/3] debug Signed-off-by: ty-dc --- .github/workflows/auto-upgrade-ci.yaml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index 46d2526728..b286d30276 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -121,17 +121,6 @@ jobs: run: | ref=$( git show -s --format='format:%H') echo "RUN_REF=${ref}" >> $GITHUB_ENV - if ${{ github.event_name == 'push' }} ; then - echo "trigger by push" - echo "NEW_VERSION=${{ github.sha }}" >> $GITHUB_ENV - # for PR scenarios, the latest version of the main branch will be used as old-version - echo "OLD_VERSION=main" >> $GITHUB_ENV - elif ${{ github.event_name == 'pull_request_target' }} ; then - echo "trigger by pull_request_target" - echo "NEW_VERSION=${{ github.sha }}" >> $GITHUB_ENV - # for PR scenarios, the latest version of the main branch will be used as old-version - echo "OLD_VERSION=main" >> $GITHUB_ENV - fi call_build_ci_image: needs: [get_ref] From d482a8904dcc22b0006c722fe451cdddfe8b68f7 Mon Sep 17 00:00:00 2001 From: ty-dc Date: Wed, 12 Jun 2024 16:26:18 +0800 Subject: [PATCH 3/3] debug pr auto upgrade Signed-off-by: ty-dc --- .github/workflows/auto-upgrade-ci.yaml | 13 +++++++++++++ pkg/ipam/pool_selections.go | 2 +- test/e2e/reliability/reliability_test.go | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/auto-upgrade-ci.yaml b/.github/workflows/auto-upgrade-ci.yaml index b286d30276..077ce5caa1 100644 --- a/.github/workflows/auto-upgrade-ci.yaml +++ b/.github/workflows/auto-upgrade-ci.yaml @@ -121,6 +121,19 @@ jobs: run: | ref=$( git show -s --format='format:%H') echo "RUN_REF=${ref}" >> $GITHUB_ENV + if ${{ github.event_name == 'push' }} ; then + echo "trigger by push" + echo "NEW_VERSION=${{ github.sha }}" >> $GITHUB_ENV + # for PR scenarios, the latest version of the main branch will be used as old-version + echo "OLD_VERSION=main" >> $GITHUB_ENV + echo "RUN_E2E_ENABLED=true" >> $GITHUB_ENV + elif ${{ github.event_name == 'pull_request_target' }} ; then + echo "trigger by pull_request_target" + echo "NEW_VERSION=${{ github.sha }}" >> $GITHUB_ENV + # for PR scenarios, the latest version of the main branch will be used as old-version + echo "OLD_VERSION=main" >> $GITHUB_ENV + echo "RUN_E2E_ENABLED=true" >> $GITHUB_ENV + fi call_build_ci_image: needs: [get_ref] diff --git a/pkg/ipam/pool_selections.go b/pkg/ipam/pool_selections.go index 1aa2854326..c0511df21f 100644 --- a/pkg/ipam/pool_selections.go +++ b/pkg/ipam/pool_selections.go @@ -41,7 +41,7 @@ func (i *ipam) getPoolCandidates(ctx context.Context, addArgs *models.IpamAddArg } else { hasSubnetsAnnotation := applicationinformers.HasSubnetsAnnotation(pod.Annotations) if hasSubnetsAnnotation { - return nil, fmt.Errorf("it's invalid to use '%s' or '%s' annotation when Auto-Pool feature is disabled", constant.AnnoSpiderSubnets, constant.AnnoSpiderSubnet) + return nil, fmt.Errorf("'%s' or '%s' annotation when Auto-Pool feature is disabled", constant.AnnoSpiderSubnets, constant.AnnoSpiderSubnet) } } } diff --git a/test/e2e/reliability/reliability_test.go b/test/e2e/reliability/reliability_test.go index fdd6538404..7307754799 100644 --- a/test/e2e/reliability/reliability_test.go +++ b/test/e2e/reliability/reliability_test.go @@ -299,7 +299,7 @@ func checkMetrics(ctx context.Context, metricsPort string) error { nodeList, err := frame.GetNodeList() if err != nil { - return fmt.Errorf("failed to get node information") + return fmt.Errorf("Failed to get node information") } var metricsHealthyCheck string