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

Fix timeout report generation race #816

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sywhang
Copy link
Contributor

@sywhang sywhang commented Nov 20, 2021

When fx is run with a very short timeout, it's possible for the
timeout error message to be in a bad format "OnStart hook added by failed"
where the name of the OnStart hook's caller hasn't been recorded
before the context times out.

This fixes the error message generation to not rely on the OnStart hook's
caller always being known to fix this race.

Fixes #815

@codecov
Copy link

codecov bot commented Nov 20, 2021

Codecov Report

Merging #816 (1a810d4) into master (88cdb34) will decrease coverage by 0.21%.
Report is 176 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #816      +/-   ##
==========================================
- Coverage   99.26%   99.05%   -0.21%     
==========================================
  Files          25       25              
  Lines         950      954       +4     
==========================================
+ Hits          943      945       +2     
- Misses          6        7       +1     
- Partials        1        2       +1     
Files Coverage Δ
app.go 99.02% <100.00%> (-0.65%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

When fx is run with a very short timeout, it's possible for the
timeout error message to be in a bad format "OnStart hook added by  failed"
where the name of the OnStart hook's caller hasn't been recorded
before the context times out.

This fixes the error message generation to not rely on the OnStart hook's
caller always being known to fix this race.

Fixes uber-go#815
@sywhang sywhang force-pushed the fix-timeout-err-race branch from 16da6a1 to 1a810d4 Compare November 20, 2021 06:13
@sywhang sywhang marked this pull request as draft November 22, 2021 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Race in timeout failure report generation
1 participant