Skip to content

engine: fix context error wrapping in executor - #7608

Merged
sipsma merged 1 commit into
dagger:mainfrom
sipsma:wrap-exit-err
Jun 11, 2024
Merged

sipsma merged 1 commit into
dagger:mainfrom
sipsma:wrap-exit-err

Conversation

@sipsma

@sipsma sipsma commented Jun 11, 2024

Copy link
Copy Markdown
Contributor

When an exec fails due to context canceled, we were dropping the cancelation error and just returning the exec error. I believe this got fat-fingered while updating the code from upstream to use fmt.Errorf instead of github.com/pkg/errors.

It's not clear if this is really meaningful, but noticed it changed while attempting to debug occurances of "exit code 137" in our CI, which plausibly could be related to all of this. It's possible there's calling code that tries to handle cancelation with errors.Is, which this would have broken. This is purely hypothetical at this point though.


This is the related upstream version of this code, if helpful https://github.com/moby/buildkit/blob/715276d7423f006dab1c96bd6910d4ca55faa230/executor/runcexecutor/executor.go#L374

When an exec fails due to context canceled, we were dropping the
cancelation error and just returning the exec error. I believe this got
fat-fingered while updating the code from upstream to use fmt.Errorf
instead of github.com/pkg/errors.

It's not clear if this is really meaningful, but noticed it changed
while attempting to debug occurances of "exit code 137" in our CI, which
plausibly could be related to all of this. It's possible there's calling
code that tries to handle cancelation with errors.Is, which this
would have broken. This is purely hypothetical at this point though.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma sipsma added this to the v0.11.7 milestone Jun 11, 2024
@sipsma
sipsma requested review from jedevc and vito June 11, 2024 03:18
@sipsma

sipsma commented Jun 11, 2024 •

Copy link
Copy Markdown
Contributor Author

Hit the same thing I hit in my other PR: #7315 (comment)

So I guess it is a pre-existing issue. I'll see if I can fix it before the release tomorrow (separate from this pr)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants