TW-5665: disable system keyring in TestValidateDefaultGrant (fix release test hang)#113
Merged
Merged
Conversation
The test reached the real macOS keychain via NewDefaultGrantStore -> SystemKeyring.IsAvailable, which spawns the 'security' binary. On the release CI runner the keychain is locked, so the subprocess blocked until the 10-minute test timeout, failing the v3.1.26 release. Set NYLAS_DISABLE_KEYRING=true so the test uses the encrypted-file fallback, matching the convention in grantstore_test.go and remote_resources_test.go.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The v3.1.26 release failed at the Run tests step: the job hit the 10-minute timeout and panicked, so the tag/GoReleaser steps never ran and the release did not ship.
Root cause
TestValidateDefaultGrant/removed_default_returns_a_clear,_actionable_errorreached the real macOS keychain:The test isolated
HOMEbut not the keyring. On the CI macOS runner the keychain is locked, so thesecuritysubprocess blocked until the test timeout. It passes locally because the dev keychain is unlocked.Fix
Set
t.Setenv("NYLAS_DISABLE_KEYRING", "true")inTestValidateDefaultGrantso it uses the encrypted-file fallback instead of the real keychain — matching the convention already used ingrantstore_test.goandremote_resources_test.go.Verification
TestValidateDefaultGrantwas the only test hitting the real keychain undergo test ./... -short(the air integration test is gated by//go:build integration;TestProvidersCmdskips ontesting.Short()before its keyring call).go test ./internal/cli/common/ -run TestValidateDefaultGrant.Follow-up
Re-run the v3.1.26 release after merge. Nothing was partially released.
Related docs
Jira: TW-5665