moby / buildkit

concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit
https://github.com/moby/moby/issues/34227
Apache License 2.0
7.85k stars 1.09k forks source link

solver: include vertex Description in OpError #5108

Closed sipsma closed 3 days ago

sipsma commented 4 days ago

These descriptions can be useful for callers to identify which op failed and plumb any custom metadata through to those failures.

sipsma commented 4 days ago

Iiuc OpError is intermediate error that gets converted to SolveError (that is a serializable error unlike OpError). Isn't that the one that should be updated? (There is also VertexError for good measure.)

Ah for Dagger's use-case we're all in-process with the solver so we use OpError directly. Can update SolveError either way too though.

VertexError seems to only support the digest atm. I guess it could be updated with the Description inside of OpError. Either would work for us, I'll go with adding to SolveError for now but can update if there's a preference.

sipsma commented 4 days ago

Pushed an update that puts it in SolveError too