Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update database role tests to avoid colliding with parallel test runs #1197

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Oct 2, 2024

Problem

The affected database role test uses a static name for the role name. It's possible for two parallel runs to collide and attempt to drop/create the same role at the same time, causing the test to fail.

The affected database role is granted future permissions on all tables in the database, which affects other grants tests.

Solution

  • Add a semi-unique suffix to the role name (1 in 1MM chance of collision now)
  • Limit the future grants to just the test schema

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

@mikealfare mikealfare added the Skip Changelog Skips GHA to check for changelog file label Oct 2, 2024
@mikealfare mikealfare self-assigned this Oct 2, 2024
@mikealfare mikealfare requested a review from a team as a code owner October 2, 2024 16:04
@cla-bot cla-bot bot added the cla:yes label Oct 2, 2024
@mikealfare mikealfare changed the title Add a unique suffix to the database role in tests to avoid colliding with parallel test runs Update database role tests to avoid colliding with parallel test runs Oct 2, 2024
@mikealfare mikealfare enabled auto-merge (squash) October 2, 2024 21:11
@mikealfare mikealfare merged commit d30670f into main Oct 2, 2024
44 checks passed
@mikealfare mikealfare deleted the fix-database-role-test branch October 2, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants