Skip to content

fix(coderd/prometheusmetrics): close batcher to force flush before asserting agent stats #9465

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
Aug 31, 2023

Conversation

johnstcn
Copy link
Member

Fixes #9105

I found it easier to reproduce this when running the affected test with a CPU-limited postgres database. Closing the batcher should flush all of our collected stats and ensure that they're all present in the database when we go to query them later.

@johnstcn johnstcn self-assigned this Aug 31, 2023
@johnstcn johnstcn requested review from spikecurtis and mtojek August 31, 2023 10:12
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Nice finding!

@johnstcn johnstcn merged commit 22f31e7 into main Aug 31, 2023
@johnstcn johnstcn deleted the cj/flake/agentstats branch August 31, 2023 10:40
@github-actions github-actions bot locked and limited conversation to collaborators Aug 31, 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.

test flake: TestAgentStats
2 participants