Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1127533

Browse files
authored
chore: revert runner sizes & parallelism from#21091 (#21380)
The juice wasn't worth the squeeze. We reduced our median run times by33% but also increased the failure rate. Even if the latter is amisattribution to this change, doubling costs for only a 33% speedup isnot worth it.The refactorings from#21091 are worthwhile keeping, so I've justreverted the runner sizes & parallelism to [previouslevels](https://github.com/coder/coder/blob/8ed1c1d3720b40a5dcc41c8a17debf93b36d3537/.github/workflows/ci.yaml).---Before:<img width="2028" height="373" alt="image"src="https://github.com/user-attachments/assets/be527e63-d14d-4bab-ac35-214e7a73c675"/>After:<img width="2040" height="403" alt="image"src="https://github.com/user-attachments/assets/fd834ae6-f310-492a-90c4-814545cda7f5"/>Signed-off-by: Danny Kopping <danny@coder.com>
1 parent61d7d29 commit1127533

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

‎.github/workflows/ci.yaml‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ jobs:
343343
test-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 }}
347347
needs:changes
348348
if: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:
470470
uses:./.github/actions/test-go-pg
471471
with:
472472
postgres-version:"13"
473-
# Our Linux runners have16 cores.
474-
test-parallelism-packages:"16"
473+
# Our Linux runners have8 cores.
474+
test-parallelism-packages:"8"
475475
test-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:
500500
uses:./.github/actions/test-go-pg
501501
with:
502502
postgres-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"
505509
test-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:
539543
api-key:${{ secrets.DATADOG_API_KEY }}
540544

541545
test-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' }}
543547
needs:
544548
-changes
545549
if:needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
@@ -585,8 +589,8 @@ jobs:
585589
uses:./.github/actions/test-go-pg
586590
with:
587591
postgres-version:"17"
588-
# Our Linux runners have16 cores.
589-
test-parallelism-packages:"16"
592+
# Our Linux runners have8 cores.
593+
test-parallelism-packages:"8"
590594
test-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:
606610
api-key:${{ secrets.DATADOG_API_KEY }}
607611

608612
test-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' }}
610614
needs:changes
611615
if:needs.changes.outputs.go == 'true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
612616
timeout-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
653657
uses:./.github/actions/test-go-pg
654658
with:
655659
postgres-version:"17"
656-
test-parallelism-packages:"8"
660+
test-parallelism-packages:"4"
657661
test-parallelism-tests:"4"
658662
race-detection:"true"
659663

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp