Skip to content

ci: warmup goose before tests to avoid ETXTBSY race#2023

Open
matthewlouisbrockman wants to merge 5 commits intomainfrom
ci-goose-text-busy
Open

ci: warmup goose before tests to avoid ETXTBSY race#2023
matthewlouisbrockman wants to merge 5 commits intomainfrom
ci-goose-text-busy

Conversation

@matthewlouisbrockman
Copy link
Contributor

@matthewlouisbrockman matthewlouisbrockman commented Feb 27, 2026

Warms up goose before running tests to avoid ETXTBSY races on tests.

Getting sporadic failing unit tests due to "text file busy" when applying goose migrations, e.g. https://github.com/e2b-dev/infra/actions/runs/22504612582/job/65200077694

=== NAME  TestTwoTeamsCanHaveSameAliasName
    namespace_resolution_test.go:92: 
        	Error Trace:	/home/runner/work/infra/infra/packages/db/pkg/testutils/db.go:120
        	            				/home/runner/work/infra/infra/packages/db/pkg/testutils/db.go:71
        	            				/home/runner/work/infra/infra/packages/db/pkg/tests/template_aliases/namespace_resolution_test.go:92
        	Error:      	Received unexpected error:
        	            	exit status 1
        	Test:       	TestTwoTeamsCanHaveSameAliasName
        	Messages:   	Migration failed: go tool goose: fork/exec /home/runner/.cache/go-build/6c/6c75c36c9707abd699068d8788342657f21a57a03cf02bec308c2246dbfcb44e-d/goose: text file busy

Also saves us about 20 seconds on the unit tests looks like -


Note

Low Risk
Low risk CI-only change that adds a pre-run step to compile/cache goose for the DB test job; main risk is only potential workflow flakiness if the tool invocation fails in CI.

Overview
Updates the PR test workflow to pre-warm the goose Go tool (via go tool goose --version) before running packages/db tests, aiming to avoid intermittent ETXTBSY failures when migrations run and to speed up the test job by caching the compiled binary.

Written by Cursor Bugbot for commit 8990e32. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@matthewlouisbrockman
Copy link
Contributor Author

something funky going on with the caching; not sure i understand it as well as I'd like; calling it for now, at least the main issue's fixed with the tests not failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants