Return cache export errors of dep when mode is max. #3731
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@tonistiigi I'm 99% sure this isn't correct as is, just sending out for discussion.
My best guess is that the right behavior is that when
mode=max
we are attempting to export every record and should thus fail if anything fails.When
mode=min
it looks like the code intends to try to include the export if we already have a remote for it, thus these lines: https://github.com/sipsma/buildkit/blob/a33bb54df091a95350ff1a05278eb5f9bfe24a6a/solver/exporter.go#L164-L166? Not totally sure on that front. If it's true, then I can see why ignoring the error makes sense in that case.
Let me know if that's on the right track, happy to update further with specific error type checks and such too.