-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Check nil worker ref in llbBridgeForwarder. #3169
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems logical for the getImmutableRef
to return nil in this case, even if that makes the patch longer. Otherwise maybe the name should be must*
client/build_test.go
Outdated
ref, err := res.SingleRef() | ||
require.NoError(t, err) | ||
|
||
// verify that this returns an error, but doesn't panic buildkitd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the ref
also be nil
in this case. Or at least there should be some saner way to check for nil ref from the client side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree but it seems tricky to deal with the case where evaluate isn't true. You won't know the actual result is nil
until its evaluated, but you have to return something to represent it until then.
I guess it would be possible to only return nil only when evaluate is true, but then you still have to deal with the case where something is "lazily nil" when evaluate is false, so I don't know if that actually simplifies anything overall.
Without this, the included test case will result in buildkitd panicking. Signed-off-by: Erik Sipsma <erik@sipsma.dev>
Yeah makes sense. I realized that all the methods in |
Without this, the included test case will result in buildkitd panicking.
Signed-off-by: Erik Sipsma erik@sipsma.dev
Diagnosed here: dagger/dagger#3330 (comment)
Also possibly related to #3134 (unless that one was already fixed)