From b823eef504e5fcd3240b5241ade5fd42f9021289 Mon Sep 17 00:00:00 2001 From: Steven Clark Date: Wed, 2 Oct 2024 09:28:59 -0400 Subject: [PATCH] Have go-test timeout before the GH step timeout to gather information - If we encounter a deadlock/long running test it is better to have go test timeout. As we've noticed if we hit the GitHub step timeout, we lose all information about what was running at the time of the timeout making things harder to diagnose. - Having the timeout through go test itself on a long running test it outputs what test was running along with a full panic output within the logs which is quite useful to diagnose --- .github/workflows/test-go.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-go.yml b/.github/workflows/test-go.yml index b565a4f20efc..9bb61654037a 100644 --- a/.github/workflows/test-go.yml +++ b/.github/workflows/test-go.yml @@ -49,6 +49,11 @@ on: required: false default: 20 type: number + go-test-timeout: + description: The timeout parameter for Go tests + required: false + default: 50m + type: string timeout-minutes: description: The maximum number of minutes that this workflow should run required: false @@ -443,7 +448,7 @@ jobs: -- \ $package_parallelism \ -tags "${{ inputs.go-tags }}" \ - -timeout=${{ env.TIMEOUT_IN_MINUTES }}m \ + -timeout=${{ inputs.go-test-timeout }} \ -parallel=${{ inputs.go-test-parallelism }} \ ${{ inputs.extra-flags }} \ - name: Prepare datadog-ci