From 159e780d74228533b0fa479b40e632afc2bb1787 Mon Sep 17 00:00:00 2001 From: Steven Clark Date: Wed, 2 Oct 2024 10:27:25 -0400 Subject: [PATCH] Have go-test timeout before the GH step timeout to gather information (#28559) - 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 b565a4f20e..9bb6165403 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