From ab184052d881827049075ff2850f9397fd78a9a8 Mon Sep 17 00:00:00 2001 From: Austin Abro <37223396+AustinAbro321@users.noreply.github.com> Date: Mon, 5 Aug 2024 03:27:04 -0400 Subject: [PATCH] fix: disk pressure flakes (#2832) Signed-off-by: Austin Abro --- .github/actions/cleanup-files/action.yaml | 8 +++++++- .github/actions/debug-cluster/action.yaml | 22 ++++++++++++++++++++++ .github/workflows/nightly-eks.yml | 16 ++-------------- .github/workflows/test-e2e.yml | 12 ++++++++++++ .github/workflows/test-external.yml | 7 +++++++ 5 files changed, 50 insertions(+), 15 deletions(-) create mode 100644 .github/actions/debug-cluster/action.yaml diff --git a/.github/actions/cleanup-files/action.yaml b/.github/actions/cleanup-files/action.yaml index d490cc086b..d466daf3a8 100644 --- a/.github/actions/cleanup-files/action.yaml +++ b/.github/actions/cleanup-files/action.yaml @@ -7,10 +7,16 @@ runs: - run: | lsblk -f + echo "removing some github actions pre-installed tools to save space" + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf /opt/hostedtoolcache/CodeQL + sudo docker system prune --all --force + + echo "removing zarf sboms, packages, cache" sudo rm -rf zarf-sbom /tmp/zarf-* sudo env "PATH=$PATH" CI=true make delete-packages sudo build/zarf tools clear-cache - sudo docker system prune --all --force lsblk -f shell: bash diff --git a/.github/actions/debug-cluster/action.yaml b/.github/actions/debug-cluster/action.yaml new file mode 100644 index 0000000000..e1f457cd92 --- /dev/null +++ b/.github/actions/debug-cluster/action.yaml @@ -0,0 +1,22 @@ +name: debug-cluster +description: "Setup Go binary and caching" + +runs: + using: composite + steps: + - run: | + echo "***** Getting pods *****" + kubectl get pods -A + + echo "***** Getting pods yaml *****" + kubectl get pods -A -o yaml + + echo "***** Describing pods *****" + kubectl describe pods -A + + echo "***** Getting nodes *****" + kubectl get nodes -A + + echo "***** describing nodes *****" + kubectl describe nodes -A + shell: bash diff --git a/.github/workflows/nightly-eks.yml b/.github/workflows/nightly-eks.yml index 3ea9aae5a9..35b94721b9 100644 --- a/.github/workflows/nightly-eks.yml +++ b/.github/workflows/nightly-eks.yml @@ -57,21 +57,9 @@ jobs: - name: Run tests run: make test-e2e-with-cluster ARCH=amd64 - - name: get pods + - name: show cluster logs + uses: ./.github/actions/debug-cluster if: always() - run: kubectl get pods -n kiwix -o yaml - - - name: describe pod - if: always() - run: kubectl describe pods -n kiwix - - - name: get nodes - if: always() - run: kubectl get nodes -o yaml - - - name: describe nodes - if: always() - run: kubectl describe nodes - name: Teardown the cluster if: always() diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index b3fee07a16..7a26ea2bd6 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -119,6 +119,10 @@ jobs: run: | make test-e2e-with-cluster ARCH=amd64 + - name: get cluster info + uses: ./.github/actions/debug-cluster + if: always() + - name: Save logs if: always() uses: ./.github/actions/save-logs @@ -197,6 +201,10 @@ jobs: run: | make test-e2e-with-cluster ARCH=amd64 + - name: get cluster info + uses: ./.github/actions/debug-cluster + if: always() + - name: Save logs if: always() uses: ./.github/actions/save-logs @@ -235,6 +243,10 @@ jobs: run: | make test-e2e-with-cluster ARCH=amd64 + - name: get cluster info + uses: ./.github/actions/debug-cluster + if: always() + - name: Save logs if: always() uses: ./.github/actions/save-logs diff --git a/.github/workflows/test-external.yml b/.github/workflows/test-external.yml index 2db9dcbcd3..8fcb4c5683 100644 --- a/.github/workflows/test-external.yml +++ b/.github/workflows/test-external.yml @@ -48,9 +48,16 @@ jobs: - name: Setup k3d uses: ./.github/actions/k3d + - name: Cleanup files + uses: ./.github/actions/cleanup-files + - name: Run external service test run: make test-external + - name: get cluster info + uses: ./.github/actions/debug-cluster + if: always() + - name: Save logs if: always() uses: ./.github/actions/save-logs