Repository navigation
engine: make otel proxy shutdown error non-fatal - #8936
Conversation
88bb11f to
0a49ba5
Compare
|
Caught it after a few re-runs: https://dagger.cloud/dagger/traces/6d46046448a86fe4dcc83f4e0f9761b6?span=f64e19849bc74e52&logs Was indeed a cleanup func, specifically Need to look into why this started happening recently. Not sure if something is just taking longer than it used to (maybe related to more otel data flowing due to metrics?) or if something is actually going wrong. Either way, that doesn't seem like something that should be fatal to an exec at least at face value. |
While trying to debug a flake I was suspecting a cleanup step might be failing. Problem is all I'm getting is "context deadline exceeded", so if it is a cleanup step, I can't tell which one. This updates any cleanup errors to be wrapped with the context on what specifically failed. Signed-off-by: Erik Sipsma <[email protected]>
I haven't tracked down why, but it appears that sometimes in our test workflows the "shutdown otel proxy" cleanup step takes over 10s, hits its timeout and then causes the exec to fail. It shouldn't take that long, but in the meantime there's no reason for this to be fatal to the exec. The error is now just logged. Signed-off-by: Erik Sipsma <[email protected]>
99a1422 to
cb7583f
Compare
vito
left a comment
There was a problem hiding this comment.
@vito let me know what you think of this workaround. I'm a bit mystified and concerned why shutting down the otel proxy server is taking >10s sometimes. The only recent change I can think of that's plausibly related is getting rid of the transactions, which I suppose could somehow be causing the http handlers take longer? Maybe? Pretty shot in the dark guess.
...Huh, yeah that's concerning. Looking into it now. Do you happen to have a repro, or is it more possibly load-induced, so just "run the whole suite and keep an eye on the logs"?
That thread about begin tx: database is locked is also ongoing and possibly demonstrates the same issue after removing the transaction.
Might be time to add some spans to our OTel data pipeline. :yodawg:
I'm good with merging this since telemetry failures shouldn't bubble up to errors in userland imo.
Sadly no, only see it CI so far and even there it's pretty ephemeral (took ~5 retries of every test suite in this PR To hit it once). So yeah, run whole suite and ctrl-F for "context deadline exceeded". Though after this change it will be ctrl-F for "timeout waiting for OTel proxy to shutdown" in engine logs |
|
Follow-up: #8950 |
Fixes #8934
I haven't tracked down why, but it appears that sometimes in our test
workflows the "shutdown otel proxy" cleanup step takes over 10s, hits
its timeout and then causes the exec to fail.
It shouldn't take that long, but in the meantime there's no reason for
this to be fatal to the exec. The error is now just logged.
@vito let me know what you think of this workaround. I'm a bit mystified and concerned why shutting down the otel proxy server is taking >10s sometimes. The only recent change I can think of that's plausibly related is getting rid of the transactions, which I suppose could somehow be causing the http handlers take longer? Maybe? Pretty shot in the dark guess.
But for now it at least stops this from breaking user execs.