@@ -466,7 +466,7 @@ jobs:
466466api-key :${{ secrets.DATADOG_API_KEY }}
467467
468468test-go-race :
469- runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8 ' || 'ubuntu-latest' }}
469+ runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16 ' || 'ubuntu-latest' }}
470470needs :changes
471471if :needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
472472timeout-minutes :25
@@ -487,9 +487,13 @@ jobs:
487487 -name :Setup Terraform
488488uses :./.github/actions/setup-tf
489489
490+ # We run race tests with reduced parallelism because they use more CPU and we were finding
491+ # instances where tests appear to hang for multiple seconds, resulting in flaky tests when
492+ # short timeouts are used.
493+ # c.f. discussion on https://github.com/coder/coder/pull/15106
490494 -name :Run Tests
491495run :|
492- gotestsum --junitfile="gotests.xml" -- -race ./...
496+ gotestsum --junitfile="gotests.xml" -- -race-parallel 4 -p 4 ./...
493497
494498 -name :Upload test stats to Datadog
495499timeout-minutes :1