Skip to content

test(agent): fix TestAgent_Metadata/Once flake #8613

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 11 commits into from
Jul 20, 2023
Merged

Conversation

coadler
Copy link
Contributor

@coadler coadler commented Jul 19, 2023

There's a race condition between checking lastCollectedAts and spawning the singleflight that could cause a metadata to execute multiple times, even if specified to run once. This moves the lastCollectedAts check to inside the singleflight to actually ensure the validity of the checks.

Also fixes an issue where the context timeout could be 0.

Latest failure

There's a race condition between checking `lastCollectedAts` and
spawning the singleflight that could cause a metadata to execute
multiple times, even if specified to run once. This moves the
`lastCollectedAts` check to inside the singleflight to actually ensure
the validity of the checks.
@coadler coadler self-assigned this Jul 19, 2023
@coadler coadler requested a review from ammario July 19, 2023 23:53
@coadler coadler changed the title flake(agent) fix TestAgent_Metadata/Once flake flake(agent): fix TestAgent_Metadata/Once flake Jul 19, 2023
@coadler coadler changed the title flake(agent): fix TestAgent_Metadata/Once flake test(agent): fix TestAgent_Metadata/Once flake Jul 19, 2023
Copy link
Member

@ammario ammario left a comment

Choose a reason for hiding this comment

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

niiiice

@ammario
Copy link
Member

ammario commented Jul 20, 2023

You can merge off my review if you want to, but I didn't meticulously vet.

@coadler coadler enabled auto-merge (squash) July 20, 2023 18:39
@coadler coadler merged commit c8d65de into main Jul 20, 2023
@coadler coadler deleted the colin/metadata-flake branch July 20, 2023 18:49
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 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.

2 participants