Skip to content

chore: fix flake in TestExecutorAutostopTemplateDisabled #11096

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 1 commit into from
Dec 8, 2023

Conversation

sreya
Copy link
Collaborator

@sreya sreya commented Dec 8, 2023

Fixes a flake where the following can happen:

  • A build starts at 23:34:59.981 but ends at 23:35:00.205
  • When calculating the deadline of 1 hour we set on the build we get 00:35:00.205.
  • We pass a tick that adds 61 minutes but it's based off the created_at instead of the completed_at of the build so we get 00:35:59.981 which truncates down to 00:35:00 which is less than the deadline.

I've gone ahead and fixed it but we should maybe reconsider whether this test should exist in autobuild since it's really testing that the deadline is set correctly in provisionerdserver. We can't really refactor this test with dbfake without completely obviating what it's trying to test.

fixes #10359

@sreya sreya force-pushed the jon/fixautobuildflake branch 2 times, most recently from e6d2173 to a555022 Compare December 8, 2023 01:33
@sreya sreya force-pushed the jon/fixautobuildflake branch from a555022 to 4a91d09 Compare December 8, 2023 01:33
@sreya sreya marked this pull request as ready for review December 8, 2023 01:33
@sreya sreya requested a review from johnstcn December 8, 2023 01:33
Copy link
Member

@johnstcn johnstcn left a comment

Choose a reason for hiding this comment

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

Nice find @sreya! Yeah it made sense to test setting the deadline here at the time, but testing it in provisionerdserver is the more correct place to do so.

Edit: filed #11098 to follow up.

@johnstcn johnstcn merged commit 02696f2 into main Dec 8, 2023
@johnstcn johnstcn deleted the jon/fixautobuildflake branch December 8, 2023 09:02
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 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: TestExecutorAutostopTemplateDisabled
2 participants