From 87e19648c4bb4fbb4c70421fbca4b48641658ecc Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 17 Nov 2025 08:53:21 +0000 Subject: [PATCH 01/16] fix(ci): add cache cleaning step to prevent 'no space left on device' errors --- .github/workflows/scripts/ci-main.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index 3f3d27a66bf..a20416b8287 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -37,6 +37,7 @@ for file in `find . -name go.mod`; do cd $dirpath go mod tidy go build ./... + go clean --cache cd - continue 1 fi @@ -50,6 +51,8 @@ for file in `find . -name go.mod`; do cd $dirpath go mod tidy go build ./... + # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. + go clean --cache # test with coverage if [ "${coverage}" = "coverage" ]; then From 8777b52fa27cff365a341858b4ae5872169679d1 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 17 Nov 2025 10:08:58 +0000 Subject: [PATCH 02/16] fix(ci): move cache cleaning step to coverage test section --- .github/workflows/scripts/ci-main.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index a20416b8287..3c4aaec9e99 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -37,7 +37,6 @@ for file in `find . -name go.mod`; do cd $dirpath go mod tidy go build ./... - go clean --cache cd - continue 1 fi @@ -51,11 +50,11 @@ for file in `find . -name go.mod`; do cd $dirpath go mod tidy go build ./... - # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - go clean --cache # test with coverage if [ "${coverage}" = "coverage" ]; then + # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. + go clean --cache go test ./... -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./...,github.com/gogf/gf/... || exit 1 if grep -q "/gogf/gf/.*/v2" go.mod; then From baed1248e2b391e17dc3d6dab16dbedf2a271ebb Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 17 Nov 2025 20:53:51 +0800 Subject: [PATCH 03/16] =?UTF-8?q?fix(ci):=20=E5=9C=A8=20examples=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E5=89=8D=E6=89=A7=E8=A1=8C=20go=20clean=20--?= =?UTF-8?q?cache=20=E9=81=BF=E5=85=8D=20CI=20=E5=87=BA=E7=8E=B0=20"no=20sp?= =?UTF-8?q?ace=20left=20on=20device"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将缓存清理步骤从 coverage 分支移除,改为在 examples 目录构建后清理缓存,避免重复清理并减少磁盘占用 --- .github/workflows/scripts/ci-main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index 3c4aaec9e99..771ba987b10 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -37,6 +37,8 @@ for file in `find . -name go.mod`; do cd $dirpath go mod tidy go build ./... + # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. + go clean --cache cd - continue 1 fi @@ -53,8 +55,6 @@ for file in `find . -name go.mod`; do # test with coverage if [ "${coverage}" = "coverage" ]; then - # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - go clean --cache go test ./... -race -coverprofile=coverage.out -covermode=atomic -coverpkg=./...,github.com/gogf/gf/... || exit 1 if grep -q "/gogf/gf/.*/v2" go.mod; then From 0d00c5a53a395a78da1aebe7279fa7c04215da3c Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 17 Nov 2025 21:50:59 +0800 Subject: [PATCH 04/16] =?UTF-8?q?fix(ci):=20=E5=B0=86=20go=20clean=20--cac?= =?UTF-8?q?he=20=E6=9B=BF=E6=8D=A2=E4=B8=BA=20go=20clean=20-x=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=9C=A8=E6=9E=84=E5=BB=BA=E5=90=8E=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A5=E9=81=BF=E5=85=8D=20CI=20=E2=80=9Cn?= =?UTF-8?q?o=20space=20left=20on=20device=E2=80=9D=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit scripts: 更新 .github/workflows/scripts/ci-main.sh,在 examples 目录和其它模块构建后统一执行 go clean -x --- .github/workflows/scripts/ci-main.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index 771ba987b10..c601192fadd 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -38,7 +38,7 @@ for file in `find . -name go.mod`; do go mod tidy go build ./... # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - go clean --cache + go clean -x cd - continue 1 fi @@ -52,6 +52,8 @@ for file in `find . -name go.mod`; do cd $dirpath go mod tidy go build ./... + # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. + go clean -x # test with coverage if [ "${coverage}" = "coverage" ]; then From 08b7c5f2f4125fb37b29fafb3c39f71023e81baf Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 17 Nov 2025 22:34:42 +0800 Subject: [PATCH 05/16] =?UTF-8?q?fix(ci):=20=E8=B0=83=E6=95=B4=20CI=20?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=B8=85=E7=90=86=E4=BD=8D=E7=BD=AE=E4=B8=8E?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 examples 构建块中的 go clean -x,避免在构建子模块时执行不必要的清理 - 在遍历模块时,当 dirpath 为根目录时提前执行 go clean -cache,以解决 CI 中的 "no space left on device" 问题 - 删除遍历结束处多余的 go clean -x 调用 --- .github/workflows/scripts/ci-main.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index c601192fadd..2a82f666ba2 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -37,8 +37,6 @@ for file in `find . -name go.mod`; do cd $dirpath go mod tidy go build ./... - # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - go clean -x cd - continue 1 fi @@ -49,11 +47,14 @@ for file in `find . -name go.mod`; do continue 1 fi + if [[ $dirpath = "." ]]; then + # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. + go clean -cache + fi + cd $dirpath go mod tidy go build ./... - # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - go clean -x # test with coverage if [ "${coverage}" = "coverage" ]; then From 09124f19c1451dd635ef71daefee287a9a7559f3 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 17 Nov 2025 22:57:02 +0800 Subject: [PATCH 06/16] =?UTF-8?q?feat(ci):=20=E6=B7=BB=E5=8A=A0=20workflow?= =?UTF-8?q?=5Fdispatch=20=E7=9A=84=20debug=20=E8=BE=93=E5=85=A5=E4=BB=A5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=89=8B=E5=8A=A8=E8=A7=A6=E5=8F=91=E8=BF=9C?= =?UTF-8?q?=E7=A8=8B=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ci: 在 ci-main.yml 中于 Checkout 后新增 Setup TMate Session 步骤;该步骤仅在 workflow_dispatch 且 inputs.debug 为 true 时运行 --- .github/workflows/ci-main.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 42f9700f415..7d5d285739b 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -20,6 +20,13 @@ on: - feature/** - enhance/** - fix/** + workflow_dispatch: + inputs: + debug: + type: boolean + description: 'Enable TMate Debug' + required: false + default: false # This allows a subsequently queued workflow run to interrupt previous runs concurrency: @@ -207,6 +214,12 @@ jobs: - name: Checkout Repository uses: actions/checkout@v5 + - name: Setup TMate Session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} + with: + detached: true + - name: Start Apollo Containers run: docker compose -f ".github/workflows/apollo/docker-compose.yml" up -d --build From 0cbf6da6a85e08de1d6228ded41a9be732c4b116 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Mon, 17 Nov 2025 23:00:07 +0800 Subject: [PATCH 07/16] =?UTF-8?q?fix(ci):=20=E5=8F=96=E6=B6=88=20TMate=20?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E8=A7=A6=E5=8F=91=E6=9D=A1=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E4=BD=BF=E5=85=B6=E5=9C=A8=E6=89=80=E6=9C=89=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=B8=8B=E5=90=AF=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 注释掉原先仅在 workflow_dispatch 且 inputs.debug 为 true 时才启动 tmate 的 if 条件,改为始终执行 Setup TMate Session 步骤,便于在更多 CI 场景下进行远程调试。 --- .github/workflows/ci-main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 7d5d285739b..a164dc40d50 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -216,7 +216,7 @@ jobs: - name: Setup TMate Session uses: mxschmitt/action-tmate@v3 - if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} + # if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} with: detached: true From aa2f24b0e45b33b6848f679f8ca018db04c1440b Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Tue, 18 Nov 2025 03:44:14 +0000 Subject: [PATCH 08/16] =?UTF-8?q?fix(ci):=20=E7=A6=81=E7=94=A8=20TMate=20?= =?UTF-8?q?=E4=BC=9A=E8=AF=9D=E7=9A=84=E8=AE=BF=E9=97=AE=E9=99=90=E5=88=B6?= =?UTF-8?q?=E4=BB=A5=E6=94=AF=E6=8C=81=E6=89=80=E6=9C=89=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index a164dc40d50..e747687145d 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -219,6 +219,7 @@ jobs: # if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} with: detached: true + limit-access-to-actor: false - name: Start Apollo Containers run: docker compose -f ".github/workflows/apollo/docker-compose.yml" up -d --build From 95170d5c8a162d4bb315bf2c493e699435fd5e54 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Tue, 18 Nov 2025 04:15:25 +0000 Subject: [PATCH 09/16] =?UTF-8?q?fix(ci):=20=E6=B7=BB=E5=8A=A0=20GOPATH=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=A5=E9=AA=A4=E4=BB=A5=E7=A1=AE=E4=BF=9D?= =?UTF-8?q?=20Go=20=E7=8E=AF=E5=A2=83=E6=AD=A3=E7=A1=AE=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index e747687145d..131c8ce18f6 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -239,6 +239,12 @@ jobs: go-version: ${{ matrix.go-version }} cache-dependency-path: '**/go.sum' + - name: Modify GOPATH + run: | + mkdir -p /mnt/go + go env -w GOPATH=/mnt/go + echo "GOPATH=$(go env GOPATH)" + - name: Install Protoc uses: arduino/setup-protoc@v3 with: From 02ef9794fc9bb71b22eb6f54b5599aa68f8a8b30 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Tue, 18 Nov 2025 09:47:28 +0000 Subject: [PATCH 10/16] =?UTF-8?q?fix(ci):=20=E7=A7=BB=E9=99=A4=20GOPATH=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AD=A5=E9=AA=A4=E4=BB=A5=E7=AE=80=E5=8C=96?= =?UTF-8?q?=20CI=20=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-main.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 131c8ce18f6..30952c16fe1 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -239,12 +239,7 @@ jobs: go-version: ${{ matrix.go-version }} cache-dependency-path: '**/go.sum' - - name: Modify GOPATH - run: | - mkdir -p /mnt/go - go env -w GOPATH=/mnt/go - echo "GOPATH=$(go env GOPATH)" - +# docker image prune -a - name: Install Protoc uses: arduino/setup-protoc@v3 with: From e7225041677ce85c3594c09e069dd1cd29821768 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Tue, 18 Nov 2025 09:59:11 +0000 Subject: [PATCH 11/16] ci: test --- .github/workflows/ci-main.yml | 1 - .github/workflows/scripts/ci-main.sh | 13 ++++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index 30952c16fe1..e747687145d 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -239,7 +239,6 @@ jobs: go-version: ${{ matrix.go-version }} cache-dependency-path: '**/go.sum' -# docker image prune -a - name: Install Protoc uses: arduino/setup-protoc@v3 with: diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index 2a82f666ba2..bd6c72f5408 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -49,7 +49,10 @@ for file in `find . -name go.mod`; do if [[ $dirpath = "." ]]; then # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - go clean -cache + # go clean -cache + docker stop $(docker ps -aq) + docker rm $(docker ps -aq) + docker rmi -f $(docker images -aq) fi cd $dirpath @@ -69,3 +72,11 @@ for file in `find . -name go.mod`; do cd - done + +# go clean --cache +# du -ah --max-depth=1 / | sort -n +# docker image prune -a +# df -h +# docker stop $(docker ps -aq) +# docker rm $(docker ps -aq) +# docker rmi -f $(docker images -aq) \ No newline at end of file From 773092958a942dabce538594ee18f0cfbb218c23 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Wed, 19 Nov 2025 02:45:35 +0000 Subject: [PATCH 12/16] =?UTF-8?q?fix(ci):=20=E6=9B=B4=E6=96=B0=E5=AD=90=20?= =?UTF-8?q?CI=20=E8=84=9A=E6=9C=AC=E4=BB=A5=E5=A4=84=E7=90=86=20examples?= =?UTF-8?q?=20=E7=9B=AE=E5=BD=95=E5=B9=B6=E7=AE=80=E5=8C=96=E6=B5=81?= =?UTF-8?q?=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/scripts/ci-main.sh | 30 ++++++++++------------------ .github/workflows/scripts/ci-sub.sh | 20 ++++++++++++++++++- 2 files changed, 29 insertions(+), 21 deletions(-) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index bd6c72f5408..799fe84f18a 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -2,12 +2,6 @@ coverage=$1 -# update code of submodules -git clone https://github.com/gogf/examples - -# update go.mod in examples directory to replace github.com/gogf/gf packages with local directory -bash .github/workflows/scripts/replace_examples_gomod.sh - # find all path that contains go.mod. for file in `find . -name go.mod`; do dirpath=$(dirname $file) @@ -24,22 +18,18 @@ for file in `find . -name go.mod`; do continue 1 fi - # Check if it's a contrib directory or examples directory - if [[ $dirpath =~ "/contrib/" ]] || [[ $dirpath =~ "/examples/" ]]; then + # examples directory was moved to sub ci procedure. + if [[ $dirpath =~ "/examples/" ]]; then + continue 1 + fi + + # Check if it's a contrib directory + if [[ $dirpath =~ "/contrib/" ]]; then # Check if go version meets the requirement if ! go version | grep -qE "go${LATEST_GO_VERSION}"; then echo "ignore path $dirpath as go version is not ${LATEST_GO_VERSION}: $(go version)" continue 1 fi - # If it's examples directory, only build without tests - if [[ $dirpath =~ "/examples/" ]]; then - echo "the examples directory only needs to be built, not unit tests and coverage tests." - cd $dirpath - go mod tidy - go build ./... - cd - - continue 1 - fi fi if [[ $file =~ "/testdata/" ]]; then @@ -50,9 +40,9 @@ for file in `find . -name go.mod`; do if [[ $dirpath = "." ]]; then # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. # go clean -cache - docker stop $(docker ps -aq) - docker rm $(docker ps -aq) - docker rmi -f $(docker images -aq) + # docker stop $(docker ps -aq) + # docker rm $(docker ps -aq) + # docker rmi -f $(docker images -aq) fi cd $dirpath diff --git a/.github/workflows/scripts/ci-sub.sh b/.github/workflows/scripts/ci-sub.sh index 70e1f13b519..191c7fd1ba8 100644 --- a/.github/workflows/scripts/ci-sub.sh +++ b/.github/workflows/scripts/ci-sub.sh @@ -2,6 +2,12 @@ coverage=$1 +# update code of submodules +git clone https://github.com/gogf/examples + +# update go.mod in examples directory to replace github.com/gogf/gf packages with local directory +bash .github/workflows/scripts/replace_examples_gomod.sh + # Function to compare version numbers version_compare() { local ver1=$1 @@ -35,7 +41,19 @@ for file in `find . -name go.mod`; do dirpath=$(dirname $file) echo "Processing: $dirpath" - # Only process kubecm directory, skip others + # Only process kubecm and examples directories + + # Process examples directory (only build, no tests) + if [[ $dirpath =~ "/examples" ]]; then + echo " the examples directory only needs to be built, not unit tests." + cd $dirpath + go mod tidy + go build ./... + cd - + continue 1 + fi + + # Process kubecm directory if [ "kubecm" != $(basename $dirpath) ]; then echo " Skipping: not kubecm directory" continue From 6924ca6e05936b9a7a731f86028f3712c3e5b5e5 Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Wed, 19 Nov 2025 02:50:39 +0000 Subject: [PATCH 13/16] =?UTF-8?q?fix(ci):=20=E6=B3=A8=E9=87=8A=E6=8E=89?= =?UTF-8?q?=E6=B8=85=E7=90=86=E7=BC=93=E5=AD=98=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BB=A5=E9=81=BF=E5=85=8D=20CI=20=E7=AE=A1=E9=81=93=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E7=A9=BA=E9=97=B4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/scripts/ci-main.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index 799fe84f18a..d488d38de52 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -37,13 +37,13 @@ for file in `find . -name go.mod`; do continue 1 fi - if [[ $dirpath = "." ]]; then - # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - # go clean -cache - # docker stop $(docker ps -aq) - # docker rm $(docker ps -aq) - # docker rmi -f $(docker images -aq) - fi + # if [[ $dirpath = "." ]]; then + # # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. + # # go clean -cache + # # docker stop $(docker ps -aq) + # # docker rm $(docker ps -aq) + # # docker rmi -f $(docker images -aq) + # fi cd $dirpath go mod tidy From 08e231f745d24d5b182c8c8366108071b40dec7a Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Wed, 19 Nov 2025 03:13:07 +0000 Subject: [PATCH 14/16] =?UTF-8?q?fix(ci):=20=E6=81=A2=E5=A4=8D=E6=B8=85?= =?UTF-8?q?=E7=90=86=E7=BC=93=E5=AD=98=E7=9A=84=E4=BB=A3=E7=A0=81=E4=BB=A5?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=20CI=20=E7=AE=A1=E9=81=93=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E7=A9=BA=E9=97=B4=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/scripts/ci-main.sh | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index d488d38de52..8699ae1b6c7 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -37,13 +37,13 @@ for file in `find . -name go.mod`; do continue 1 fi - # if [[ $dirpath = "." ]]; then - # # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. - # # go clean -cache - # # docker stop $(docker ps -aq) - # # docker rm $(docker ps -aq) - # # docker rmi -f $(docker images -aq) - # fi + if [[ $dirpath = "." ]]; then + # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. + go clean -cache + # docker stop $(docker ps -aq) + # docker rm $(docker ps -aq) + # docker rmi -f $(docker images -aq) + fi cd $dirpath go mod tidy @@ -62,11 +62,3 @@ for file in `find . -name go.mod`; do cd - done - -# go clean --cache -# du -ah --max-depth=1 / | sort -n -# docker image prune -a -# df -h -# docker stop $(docker ps -aq) -# docker rm $(docker ps -aq) -# docker rmi -f $(docker images -aq) \ No newline at end of file From 0a464a2c1b9f6ddd5c5a64cd43f9faad0938908f Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Wed, 19 Nov 2025 03:38:43 +0000 Subject: [PATCH 15/16] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8D=20CI=20?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=BB=A5=E9=81=BF=E5=85=8D=E2=80=9C=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E4=B8=8A=E6=B2=A1=E6=9C=89=E7=A9=BA=E9=97=B4=E2=80=9D?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=8C=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=20Docker=20=E6=B8=85=E7=90=86=E5=91=BD?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-main.yml | 2 +- .github/workflows/scripts/ci-main.sh | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index e747687145d..dd6e6185116 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -216,7 +216,7 @@ jobs: - name: Setup TMate Session uses: mxschmitt/action-tmate@v3 - # if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} with: detached: true limit-access-to-actor: false diff --git a/.github/workflows/scripts/ci-main.sh b/.github/workflows/scripts/ci-main.sh index 8699ae1b6c7..b24b2d9894c 100644 --- a/.github/workflows/scripts/ci-main.sh +++ b/.github/workflows/scripts/ci-main.sh @@ -40,9 +40,6 @@ for file in `find . -name go.mod`; do if [[ $dirpath = "." ]]; then # No space left on device error sometimes occurs in CI pipelines, so clean the cache before tests. go clean -cache - # docker stop $(docker ps -aq) - # docker rm $(docker ps -aq) - # docker rmi -f $(docker images -aq) fi cd $dirpath From c004e1133409cae415f599bd0f96bc497302951f Mon Sep 17 00:00:00 2001 From: hailaz <739476267@qq.com> Date: Wed, 19 Nov 2025 04:18:53 +0000 Subject: [PATCH 16/16] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E6=AD=A3=20CI=20?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=E4=B8=AD=E7=9A=84=E6=8F=8F=E8=BF=B0=E5=92=8C?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E5=8C=B9=E9=85=8D=EF=BC=8C=E4=BB=A5=E6=8F=90?= =?UTF-8?q?=E9=AB=98=E5=8F=AF=E8=AF=BB=E6=80=A7=E5=92=8C=E5=87=86=E7=A1=AE?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-main.yml | 4 ++-- .github/workflows/scripts/ci-sub.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-main.yml b/.github/workflows/ci-main.yml index dd6e6185116..e30b8175e51 100644 --- a/.github/workflows/ci-main.yml +++ b/.github/workflows/ci-main.yml @@ -24,7 +24,7 @@ on: inputs: debug: type: boolean - description: 'Enable TMate Debug' + description: 'Enable tmate Debug' required: false default: false @@ -214,7 +214,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v5 - - name: Setup TMate Session + - name: Setup tmate Session uses: mxschmitt/action-tmate@v3 if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug }} with: diff --git a/.github/workflows/scripts/ci-sub.sh b/.github/workflows/scripts/ci-sub.sh index 191c7fd1ba8..9683b355e21 100644 --- a/.github/workflows/scripts/ci-sub.sh +++ b/.github/workflows/scripts/ci-sub.sh @@ -41,10 +41,10 @@ for file in `find . -name go.mod`; do dirpath=$(dirname $file) echo "Processing: $dirpath" - # Only process kubecm and examples directories + # Only process examples and kubecm directories # Process examples directory (only build, no tests) - if [[ $dirpath =~ "/examples" ]]; then + if [[ $dirpath =~ "/examples/" ]]; then echo " the examples directory only needs to be built, not unit tests." cd $dirpath go mod tidy