@@ -343,7 +343,7 @@ jobs:
343343test-go-pg :
344344# make sure to adjust NUM_PARALLEL_PACKAGES and NUM_PARALLEL_TESTS below
345345# when changing runner sizes
346- runs-on :${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16 ' || matrix.os && matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'depot-windows-2022-32 ' || matrix.os }}
346+ runs-on :${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8 ' || matrix.os && matrix.os == 'macos-latest' && github.repository_owner == 'coder' && 'depot-macos-latest' || matrix.os == 'windows-2022' && github.repository_owner == 'coder' && 'depot-windows-2022-16 ' || matrix.os }}
347347needs :changes
348348if :needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
349349# This timeout must be greater than the timeout set by `go test` in
@@ -470,8 +470,8 @@ jobs:
470470uses :./.github/actions/test-go-pg
471471with :
472472postgres-version :" 13"
473- # Our Linux runners have16 cores.
474- test-parallelism-packages :" 16 "
473+ # Our Linux runners have8 cores.
474+ test-parallelism-packages :" 8 "
475475test-parallelism-tests :" 8"
476476# By default, run tests with cache for improved speed (possibly at the expense of correctness).
477477# On main, run tests without cache for the inverse.
@@ -500,8 +500,12 @@ jobs:
500500uses :./.github/actions/test-go-pg
501501with :
502502postgres-version :" 13"
503- # Our Windows runners have 32 cores.
504- test-parallelism-packages :" 32"
503+ # Our Windows runners have 16 cores.
504+ # On Windows Postgres chokes up when we have 16x16=256 tests
505+ # running in parallel, and dbtestutil.NewDB starts to take more than
506+ # 10s to complete sometimes causing test timeouts. With 16x8=128 tests
507+ # Postgres tends not to choke.
508+ test-parallelism-packages :" 8"
505509test-parallelism-tests :" 16"
506510# By default, run tests with cache for improved speed (possibly at the expense of correctness).
507511# On main, run tests without cache for the inverse.
@@ -539,7 +543,7 @@ jobs:
539543api-key :${{ secrets.DATADOG_API_KEY }}
540544
541545test-go-pg-17 :
542- runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16 ' || 'ubuntu-latest' }}
546+ runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8 ' || 'ubuntu-latest' }}
543547needs :
544548 -changes
545549if :needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
@@ -585,8 +589,8 @@ jobs:
585589uses :./.github/actions/test-go-pg
586590with :
587591postgres-version :" 17"
588- # Our Linux runners have16 cores.
589- test-parallelism-packages :" 16 "
592+ # Our Linux runners have8 cores.
593+ test-parallelism-packages :" 8 "
590594test-parallelism-tests :" 8"
591595# By default, run tests with cache for improved speed (possibly at the expense of correctness).
592596# On main, run tests without cache for the inverse.
@@ -606,7 +610,7 @@ jobs:
606610api-key :${{ secrets.DATADOG_API_KEY }}
607611
608612test-go-race-pg :
609- runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-32 ' || 'ubuntu-latest' }}
613+ runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-16 ' || 'ubuntu-latest' }}
610614needs :changes
611615if :needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
612616timeout-minutes :25
@@ -647,13 +651,13 @@ jobs:
647651# instances where tests appear to hang for multiple seconds, resulting in flaky tests when
648652# short timeouts are used.
649653# c.f. discussion on https://github.com/coder/coder/pull/15106
650- # Our Linux runners have32 cores, but we reduce parallelism since race detection adds a lot of overhead.
651- # We aim to have parallelism match CPU count (8 *4=32 ) to avoid making flakes worse.
654+ # Our Linux runners have16 cores, but we reduce parallelism since race detection adds a lot of overhead.
655+ # We aim to have parallelism match CPU count (4 *4=16 ) to avoid making flakes worse.
652656 -name :Run Tests
653657uses :./.github/actions/test-go-pg
654658with :
655659postgres-version :" 17"
656- test-parallelism-packages :" 8 "
660+ test-parallelism-packages :" 4 "
657661test-parallelism-tests :" 4"
658662race-detection :" true"
659663