From 607cc880a8a125ede64cd5b8c93b99df3486f915 Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Tue, 6 Feb 2024 10:24:17 +0800 Subject: [PATCH 1/8] ci: update disabling pre-upgrade checker setting for argocd Signed-off-by: Yang Chiu --- pipelines/utilities/argocd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipelines/utilities/argocd.sh b/pipelines/utilities/argocd.sh index cb6d6c0e8d..fa56809e31 100755 --- a/pipelines/utilities/argocd.sh +++ b/pipelines/utilities/argocd.sh @@ -48,8 +48,8 @@ spec: targetRevision: ${REVISION} helm: values: | - helmPreUpgradeCheckerJob: - enabled: false + preUpgradeChecker: + jobEnabled: false destination: server: https://kubernetes.default.svc namespace: ${LONGHORN_NAMESPACE} From 45ca7cd5fdc94db6baa1800db0650eb70f2e4c03 Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Mon, 22 Jan 2024 15:41:22 +0800 Subject: [PATCH 2/8] test: fix flaky test case test_offline_node Signed-off-by: Yang Chiu --- test_framework/scripts/longhorn-setup.sh | 4 ++++ test_framework/scripts/terraform-setup.sh | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test_framework/scripts/longhorn-setup.sh b/test_framework/scripts/longhorn-setup.sh index 691dedabf3..7782f99a25 100755 --- a/test_framework/scripts/longhorn-setup.sh +++ b/test_framework/scripts/longhorn-setup.sh @@ -323,6 +323,7 @@ run_longhorn_upgrade_test(){ yq e -i 'select(.spec.containers[0] != null).spec.containers[0].env[4].value="'${LONGHORN_UPGRADE_TYPE}'"' ${LONGHORN_UPGRADE_TESTS_MANIFEST_FILE_PATH} + RESOURCE_SUFFIX=$(terraform -chdir=${TF_VAR_tf_workspace}/terraform/${LONGHORN_TEST_CLOUDPROVIDER}/${DISTRO} output -raw resource_suffix) yq e -i 'select(.spec.containers[0] != null).spec.containers[0].env[7].value="'${RESOURCE_SUFFIX}'"' ${LONGHORN_UPGRADE_TESTS_MANIFEST_FILE_PATH} kubectl apply -f ${LONGHORN_UPGRADE_TESTS_MANIFEST_FILE_PATH} @@ -389,6 +390,9 @@ run_longhorn_tests(){ LONGHORN_TEST_POD_NAME=`yq e 'select(.spec.containers[0] != null).metadata.name' ${LONGHORN_TESTS_MANIFEST_FILE_PATH}` + RESOURCE_SUFFIX=$(terraform -chdir=${TF_VAR_tf_workspace}/terraform/${LONGHORN_TEST_CLOUDPROVIDER}/${DISTRO} output -raw resource_suffix) + yq e -i 'select(.spec.containers[0] != null).spec.containers[0].env[7].value="'${RESOURCE_SUFFIX}'"' ${LONGHORN_TESTS_MANIFEST_FILE_PATH} + kubectl apply -f ${LONGHORN_TESTS_MANIFEST_FILE_PATH} local RETRY_COUNTS=60 diff --git a/test_framework/scripts/terraform-setup.sh b/test_framework/scripts/terraform-setup.sh index 3d28f7c2c5..6c7beee307 100755 --- a/test_framework/scripts/terraform-setup.sh +++ b/test_framework/scripts/terraform-setup.sh @@ -32,8 +32,6 @@ terraform_setup(){ if [[ "${TF_VAR_create_load_balancer}" == true ]]; then terraform -chdir=${TF_VAR_tf_workspace}/terraform/${LONGHORN_TEST_CLOUDPROVIDER}/${DISTRO} output -raw load_balancer_url > ${TF_VAR_tf_workspace}/load_balancer_url fi - - export RESOURCE_SUFFIX=$(terraform -chdir=${TF_VAR_tf_workspace}/terraform/${LONGHORN_TEST_CLOUDPROVIDER}/${DISTRO} output -raw resource_suffix) } From 8b4dce86baa56beb041f4d52c995c326bf0e2971 Mon Sep 17 00:00:00 2001 From: David Ko Date: Wed, 7 Feb 2024 22:45:02 +0800 Subject: [PATCH 3/8] Update mergify.yml Signed-off-by: David Ko --- .github/mergify.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 2dd1aee601..391743c6ed 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -5,9 +5,8 @@ pull_request_rules: - check-success=DCO - check-success=CodeFactor - check-success=codespell - - "#approved-reviews-by>=1" - - approved-reviews-by=@longhorn/maintainer - - label=ready-to-merge + - "#approved-reviews-by>=2" + - approved-reviews-by=[@longhorn/maintainer, @longhorn/qa] actions: merge: method: rebase @@ -17,18 +16,4 @@ pull_request_rules: - conflict actions: comment: - message: This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 - -# Comment on the PR to trigger backport. ex: @Mergifyio copy stable/3.1 stable/4.0 -- name: backport patches to stable branch - conditions: - - base=master - actions: - backport: - title: "[BACKPORT][{{ destination_branch }}] {{ title }}" - body: | - This is an automatic backport of pull request #{{number}}. - - {{cherry_pick_error}} - assignees: - - "{{ author }}" \ No newline at end of file + message: This pull request is now in conflict. Could you fix it @{{author}}? 🙏 From b601a899e739c937466454217cc0f2298e877b2a Mon Sep 17 00:00:00 2001 From: David Ko Date: Wed, 7 Feb 2024 23:08:24 +0800 Subject: [PATCH 4/8] Create codespell.yml Signed-off-by: David Ko --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000000..b1ab6b8e6a --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +name: Codespell + +on: + pull_request: + branches: + - master + - main + - "v*.*.*" + +jobs: + codespell: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + - name: Check code spell + uses: codespell-project/actions-codespell@v2 + with: + check_filenames: true + skip: "*/**.yaml,*/**.yml,./scripts,./vendor,MAINTAINERS,LICENSE,go.mod,go.sum" From 2f5a0e99b8c48d8e87a5ce08b981d4918b4c9683 Mon Sep 17 00:00:00 2001 From: Eric Weber Date: Wed, 7 Feb 2024 16:27:03 -0600 Subject: [PATCH 5/8] Fix automated mirroring of livenessprobe Longhorn 7428 Signed-off-by: Eric Weber --- mirror_csi_images/scripts/publish.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mirror_csi_images/scripts/publish.sh b/mirror_csi_images/scripts/publish.sh index 4d918fb099..8ff6bf755c 100755 --- a/mirror_csi_images/scripts/publish.sh +++ b/mirror_csi_images/scripts/publish.sh @@ -9,7 +9,7 @@ if [[ -n "${LONGHORN_IMAGES_FILE_URL}" ]]; then wget "${LONGHORN_IMAGES_FILE_URL}" -O "${LONGHORN_IMAGES_FILE}" while read -r LINE; do - if [[ "${LINE}" =~ "csi-" ]]; then + if [[ "${LINE}" =~ csi-|livenessprobe ]]; then CSI_IMAGE=$(echo "${LINE}" | sed -e "s/longhornio\///g") IFS=: read -ra IMAGE_TAG_PAIR <<< "${CSI_IMAGE}" echo "registry.k8s.io/sig-storage/${IMAGE_TAG_PAIR[0]}" "longhornio/${IMAGE_TAG_PAIR[0]}" "${IMAGE_TAG_PAIR[1]}" >> "${INFILE}" @@ -23,7 +23,7 @@ else IFS=, read -ra CSI_IMAGES_ARR <<< "${CSI_IMAGES}" for CSI_IMAGE in "${CSI_IMAGES_ARR[@]}"; do IFS=: read -ra IMAGE_TAG_PAIR <<< "$CSI_IMAGE" - if [[ "${CSI_IMAGE}" =~ "csi-" ]]; then + if [[ "${CSI_IMAGE}" =~ csi-|livenessprobe ]]; then echo "registry.k8s.io/sig-storage/${IMAGE_TAG_PAIR[0]}" "longhornio/${IMAGE_TAG_PAIR[0]}" "${IMAGE_TAG_PAIR[1]}" >> "${INFILE}" elif [[ "${CSI_IMAGE}" =~ "support-bundle-kit" ]]; then echo "rancher/${IMAGE_TAG_PAIR[0]}" "longhornio/${IMAGE_TAG_PAIR[0]}" "${IMAGE_TAG_PAIR[1]}" >> "${INFILE}" From 0db8dfe25f1dbd33052e2db3f8ab3f825ec8477d Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Thu, 15 Feb 2024 10:34:06 +0800 Subject: [PATCH 6/8] Revert "Update mergify.yml" This reverts commit 8b4dce86baa56beb041f4d52c995c326bf0e2971. Signed-off-by: Yang Chiu --- .github/mergify.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 391743c6ed..2dd1aee601 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -5,8 +5,9 @@ pull_request_rules: - check-success=DCO - check-success=CodeFactor - check-success=codespell - - "#approved-reviews-by>=2" - - approved-reviews-by=[@longhorn/maintainer, @longhorn/qa] + - "#approved-reviews-by>=1" + - approved-reviews-by=@longhorn/maintainer + - label=ready-to-merge actions: merge: method: rebase @@ -16,4 +17,18 @@ pull_request_rules: - conflict actions: comment: - message: This pull request is now in conflict. Could you fix it @{{author}}? 🙏 + message: This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 + +# Comment on the PR to trigger backport. ex: @Mergifyio copy stable/3.1 stable/4.0 +- name: backport patches to stable branch + conditions: + - base=master + actions: + backport: + title: "[BACKPORT][{{ destination_branch }}] {{ title }}" + body: | + This is an automatic backport of pull request #{{number}}. + + {{cherry_pick_error}} + assignees: + - "{{ author }}" \ No newline at end of file From 7d9378cdafb8984d1aae56f690c2be5c0f1388de Mon Sep 17 00:00:00 2001 From: David Ko Date: Thu, 15 Feb 2024 10:57:33 +0800 Subject: [PATCH 7/8] Update mergify.yml --- .github/mergify.yml | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/mergify.yml b/.github/mergify.yml index 2dd1aee601..0da48caa09 100644 --- a/.github/mergify.yml +++ b/.github/mergify.yml @@ -5,9 +5,8 @@ pull_request_rules: - check-success=DCO - check-success=CodeFactor - check-success=codespell - - "#approved-reviews-by>=1" + - "#approved-reviews-by>=2" - approved-reviews-by=@longhorn/maintainer - - label=ready-to-merge actions: merge: method: rebase @@ -17,18 +16,4 @@ pull_request_rules: - conflict actions: comment: - message: This pull request is now in conflicts. Could you fix it @{{author}}? 🙏 - -# Comment on the PR to trigger backport. ex: @Mergifyio copy stable/3.1 stable/4.0 -- name: backport patches to stable branch - conditions: - - base=master - actions: - backport: - title: "[BACKPORT][{{ destination_branch }}] {{ title }}" - body: | - This is an automatic backport of pull request #{{number}}. - - {{cherry_pick_error}} - assignees: - - "{{ author }}" \ No newline at end of file + message: This pull request is now in conflict. Could you fix it @{{author}}? 🙏 From 46cfe13e252ebc7cbb8d712fca7e3a783ae5ea5f Mon Sep 17 00:00:00 2001 From: Yang Chiu Date: Fri, 16 Feb 2024 09:29:46 +0800 Subject: [PATCH 8/8] test: fix flaky test case test_extra_replica_cleanup Signed-off-by: Yang Chiu --- manager/integration/tests/test_ha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manager/integration/tests/test_ha.py b/manager/integration/tests/test_ha.py index 6c1a794515..797d7ee484 100644 --- a/manager/integration/tests/test_ha.py +++ b/manager/integration/tests/test_ha.py @@ -1984,7 +1984,7 @@ def test_extra_replica_cleanup(client, volume_name, settings_reset): # NOQA wait_for_volume_replica_count(client, volume_name, 3) volume = client.by_id_volume(volume_name) - assert volume.robustness == "healthy" + wait_for_volume_healthy(client, volume_name) check_volume_data(volume, data)