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

chore: run test-go-pg on macOS and Windows in regular CI#17853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
hugodutka merged 6 commits intomainfromhugodutka/test-go-pg-windows-macos-cache
May 22, 2025

Conversation

hugodutka
Copy link
Contributor

@hugodutkahugodutka commentedMay 15, 2025
edited
Loading

This PR starts running test-go-pg on macOS and Windows in regular CI. Previously this suite was only run in the nightly gauntlet for 2 reasons:

  • it was flaky
  • it was slow (took 17 minutes)

We've since stabilized the flakiness by switching to depot runners, using ram disks, optimizing the number of tests run in parallel, and automatically re-running failing tests. We've alsobrought down the time to run the suite to 9 minutes. Additionally, this PR allows test-go-pg to use cache from previous runs, which speeds it up further. The cache is only used on PRs,main will still run tests without it.

This PR also:

  • removes the nightly gauntlet since all tests now run in regular CI
  • removes thetest-cli job for the same reason
  • removes thesetup-imdisk action which is now fully replaced bycoder/setup-ramdisk-action
  • makes 2 minor changes which could be separate PRs, but I rolled them into this because they were helpful when iterating on it:
    • replace theif: always() condition on thegen job with aif: ${{ !cancelled() }} to allow the job to be cancelled. Previously the job would run to completion even if the entire workflow was cancelled. Seethe GitHub docs for more details.
    • disable the recently addedTestReinitializeAgent since it does not pass on Windows with Postgres. There's an open issue to fix it:flake:TestReinitializeAgent internal#642

This PR will:

I tested caching by temporarily enabling cache upload on this PR: here'sa run showing cache being used.

@hugodutkahugodutkaforce-pushed thehugodutka/test-go-pg-windows-macos-cache branch 23 times, most recently fromc3f6634 to291a7dfCompareMay 19, 2025 11:54
@hugodutkahugodutka changed the titlechore: run test-go-pg on macOS and Windows with test cachechore: run test-go-pg on macOS and Windows in regular CIMay 19, 2025
@hugodutkahugodutkaforce-pushed thehugodutka/test-go-pg-windows-macos-cache branch 5 times, most recently from9c27aa8 toe321870CompareMay 19, 2025 14:07
@hugodutkahugodutkaforce-pushed thehugodutka/test-go-pg-windows-macos-cache branch 5 times, most recently from3bcc4f4 toc8e68dbCompareMay 19, 2025 17:23
@hugodutkahugodutka marked this pull request as ready for reviewMay 19, 2025 17:44
id: paths
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
script: |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I don't mind using the script here, but you can accomplish the same with bash by echoing toGITHUB_ENV andGITHUB_OUTPUT:https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I chose to use the script to handle setting multi-line env variables. With bash, you have to be very careful with whitespace and indentation. It's error-prone.

deansheather reacted with thumbs up emoji

- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1

- name: Setup Go Paths
uses: ./.github/actions/setup-go-paths
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Previously we were only doing this on Windows, should we do the same here?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This step is now used to standardize the Go cache location on disk so the "download cache step" knows where to put it. Without it, it's somewhat complicated to figure out the paths so it works cross-OS and if Go isn't installed.

deansheather reacted with thumbs up emoji
runs-on: ${{ matrix.os == 'ubuntu-latest' && github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || matrix.os }}
# make sure to adjust NUM_PARALLEL_PACKAGES and NUM_PARALLEL_TESTS below
# when changing runner sizes
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 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This line is an abomination lmfao

hugodutka reacted with confused emoji
@@ -83,6 +84,10 @@ func TestBlockNonBrowser(t *testing.T) {
func TestReinitializeAgent(t *testing.T) {
t.Parallel()

if runtime.GOOS == "windows" {
t.Skip("this test doesn't pass on Windows with Postgres")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please open an internal ticket

Copy link
ContributorAuthor

@hugodutkahugodutkaMay 22, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

the skip has already been merged separately:#17968, so I'm removing it from this PR

Comment on lines +554 to +556
# terraform gets installed in a random directory, so we need to normalize
# the path to the terraform binary or a bunch of cached tests will be
# invalidated. See scripts/normalize_path.sh for more details.
normalize_path_with_symlinks "$RUNNER_TEMP/sym" "$(dirname $(which terraform))"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I feel like it would be better if we changed the test to use system terraform if it's a suitable version, then we can just install it before starting the test.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you mean we should use the terraform download function that's built into Coder?

@hugodutkahugodutkaforce-pushed thehugodutka/test-go-pg-windows-macos-cache branch fromc8e68db to64646edCompareMay 22, 2025 10:13
@hugodutkahugodutkaforce-pushed thehugodutka/test-go-pg-windows-macos-cache branch from64646ed to2929c79CompareMay 22, 2025 10:13
@hugodutkahugodutka merged commita0e229a intomainMay 22, 2025
35 of 37 checks passed
@hugodutkahugodutka deleted the hugodutka/test-go-pg-windows-macos-cache branchMay 22, 2025 13:53
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@hugodutkahugodutka

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hugodutka@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp