Skip to content

chore: fix TestWorkspaceAutobuild/DormancyThresholdOK flake #11251

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

Merged
merged 3 commits into from
Dec 18, 2023

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented Dec 17, 2023

fixes #11238

Checking for audit logs generated from workspace builds is flaky since there exists a small gap of time between when the transaction is committed for completing a job and when we write an audit log. In fact this means any test in our coderd package that is asserting build-related audit logs is inherently flaky since we all use the coderdtest.AwaitWorkspaceBuildJobCompleted to indicate it is a good time to check for audit log generation. We should probably remove any workspace build audit log assertions from coderd and test it solely in provisionerdserver.

I opted to move this to use dbfake since that eliminates any raciness with the provisioner's audit logs.

@sreya sreya requested a review from mafredri December 17, 2023 21:33
@sreya sreya merged commit 56cbd47 into main Dec 18, 2023
@sreya sreya deleted the jon/dormancyflake branch December 18, 2023 15:23
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flake: enterprise/coderd TestWorkspaceAutobuild/DormancyThresholdOK
2 participants