From f3bbf627a33c73acdafbeb9e264639b333ef537a Mon Sep 17 00:00:00 2001 From: Mathias Fredriksson Date: Mon, 16 Jan 2023 17:58:57 +0200 Subject: [PATCH] chore: Update gotestsum to v1.9.0 and remove debugging (#5726) * chore: Update gotestsum to v1.9.0 and remove debugging * chore: Update cloud.google.gpg to fix dogfood build --- .github/workflows/coder.yaml | 51 ++---------------- Makefile | 3 +- dogfood/Dockerfile | 2 +- .../files/usr/share/keyrings/google-cloud.gpg | Bin 2537 -> 1210 bytes 4 files changed, 5 insertions(+), 51 deletions(-) diff --git a/.github/workflows/coder.yaml b/.github/workflows/coder.yaml index c5924dfe12..37ce3bd17e 100644 --- a/.github/workflows/coder.yaml +++ b/.github/workflows/coder.yaml @@ -320,7 +320,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repo: gotestyourself/gotestsum - tag: v1.8.2 + tag: v1.9.0 - uses: hashicorp/setup-terraform@v2 with: @@ -340,30 +340,8 @@ jobs: else echo ::set-output name=cover::false fi - set +e - gotestsum --junitfile="gotests.xml" --jsonfile="gotestsum.json" --packages="./..." --debug -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS - ret=$? - if ((ret)); then - # Eternalize test timeout logs because "re-run failed" erases - # artifacts and gotestsum doesn't always capture it: - # https://github.com/gotestyourself/gotestsum/issues/292 - # Multiple test packages could've failed, each one may or may - # not run into the edge case. PS. Don't summon ShellCheck here. - for testWithStack in $(grep 'panic: test timed out' gotestsum.json | grep -E -o '("Test":[^,}]*)'); do - if [ -n "$testWithStack" ] && grep -q "${testWithStack}.*PASS" gotestsum.json; then - echo "Conditions met for gotestsum stack trace missing bug, outputting panic trace:" - grep -A 999999 "${testWithStack}.*panic: test timed out" gotestsum.json - fi - done - fi - exit $ret - - uses: actions/upload-artifact@v3 - if: success() || failure() - with: - name: gotestsum-debug-${{ matrix.os }}.json - path: ./gotestsum.json - retention-days: 7 + gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=5m -short -failfast $COVERAGE_FLAGS - uses: actions/upload-artifact@v3 if: success() || failure() @@ -423,7 +401,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: repo: gotestyourself/gotestsum - tag: v1.8.2 + tag: v1.9.0 - uses: hashicorp/setup-terraform@v2 with: @@ -432,30 +410,7 @@ jobs: - name: Test with PostgreSQL Database run: | - set +e make test-postgres - ret=$? - if ((ret)); then - # Eternalize test timeout logs because "re-run failed" erases - # artifacts and gotestsum doesn't always capture it: - # https://github.com/gotestyourself/gotestsum/issues/292 - # Multiple test packages could've failed, each one may or may - # not run into the edge case. PS. Don't summon ShellCheck here. - for testWithStack in $(grep 'panic: test timed out' gotestsum.json | grep -E -o '("Test":[^,}]*)'); do - if [ -n "$testWithStack" ] && grep -q "${testWithStack}.*PASS" gotestsum.json; then - echo "Conditions met for gotestsum stack trace missing bug, outputting panic trace:" - grep -A 999999 "${testWithStack}.*panic: test timed out" gotestsum.json - fi - done - fi - exit $ret - - - uses: actions/upload-artifact@v3 - if: success() || failure() - with: - name: gotestsum-debug-postgres.json - path: ./gotestsum.json - retention-days: 7 - uses: actions/upload-artifact@v3 if: success() || failure() diff --git a/Makefile b/Makefile index cd7c316a4e..1d10189b40 100644 --- a/Makefile +++ b/Makefile @@ -556,7 +556,7 @@ site/.eslintignore site/.prettierignore: .prettierignore Makefile done < "$<" test: test-clean - gotestsum --debug -- -v -short ./... + gotestsum -- -v -short ./... .PHONY: test # When updating -timeout for this test, keep in sync with @@ -566,7 +566,6 @@ test-postgres: test-clean test-postgres-docker # more consistent execution. DB=ci DB_FROM=$(shell go run scripts/migrate-ci/main.go) gotestsum \ --junitfile="gotests.xml" \ - --jsonfile="gotestsum.json" \ --packages="./..." -- \ -covermode=atomic -coverprofile="gotests.coverage" -timeout=20m \ -parallel=4 \ diff --git a/dogfood/Dockerfile b/dogfood/Dockerfile index 34c53d761b..2088598841 100644 --- a/dogfood/Dockerfile +++ b/dogfood/Dockerfile @@ -43,7 +43,7 @@ RUN mkdir --parents "$GOPATH" && \ # the language server protocol go install golang.org/x/tools/gopls@latest && \ # gotestsum makes test output more readable - go install gotest.tools/gotestsum@v1.7.0 && \ + go install gotest.tools/gotestsum@v1.9.0 && \ # goveralls collects code coverage metrics from tests # and sends to Coveralls go install github.com/mattn/goveralls@v0.0.11 && \ diff --git a/dogfood/files/usr/share/keyrings/google-cloud.gpg b/dogfood/files/usr/share/keyrings/google-cloud.gpg index 3f0b5a850ba73c4b6d7fe5b206030ee9d0b4da46..0f478144f1491ce0e6668faf181eb8a7f24a208a 100644 GIT binary patch delta 1161 zcmV;41a|xB6S@h1#=uPkVu-cW0SExrn54~QMizm5yWCsK6^>sv>OgCi&-N;;e2qO=TNPIv7a1zM(s)jad93J z-&)JXaAPov-}9cFZ6e=P&Y-5*gv48uRG&0Bt#&F^0=5)?vADtJ3FWe|k&l_ObV;W? zT^wR`q!_BgLlg10&~%)pP#Q3w0viJY836zQ!KerTd_WUOAl=Z|J=$s--;utW#ol?$ z>=Dx0>x$x0pz-K7>MJ^sul1#jGV}ll)uhJD$;3f?IY#q^CL;kJci|A?f;8T?GJm#< zYzi+wUv2uZrrZY=W^81(Zl^J>ry=2>B%R6 zo+0t@zg}(7{j}4xzbkZe{!1RS5@mLmo~vMj7O+s!}xm9DI+G1~0Jt5{uJ_nky?0!HX{7B_U#i&{hM z1{Zl4?~LVIE5Ye%dbV=?Ni;Q~RsmA}$Auy2Cz~MB$19lnLivS+3v%$@sEmYg)8x$Q6~q6=WnSiCrV literal 2537 zcmajfc{mj69tZFtYb6Ywv1ebZVJuB(aK<`@5*dapjltLl&DfcP9E`}sG{~;3VJfmD zVak?WwAd1|j4j&@rK{6@o_kOCKF|H<{p0t(fBc^B`+Yv`Ef?9Y>G0XHZ~{`Sx~!T!dveZitA&#vuaeY1DI5>;d|o*d4Lp%{Zqwntwi(+p z&Bu6qBYHxkM)FlF1?NBexq_|FI7ZMRv{MlQfEd*#I?S2~-S?+D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