Repository navigation
feat: fail when connecting to vanilla buildkit - #5892
Conversation
Signed-off-by: Justin Chadwell <[email protected]>
@vito the upcoming release is going to be a breaking change that requires everyone update both CLI and Engine to compatible versions right? If so, then I think you can leave the stronger check in place @jedevc. However, if the upcoming release isn't breaking CLI<->Engine then I'd prefer to have the weaker check for now, while still updating our (This is my only concern, other than that LGTM.) |
|
@sipsma The two breaking PRs are #5557 and #5881, which are both at the API layer, so now that the API lives in the engine that implies at least an engine bump, vs the old world where this was technically CLI-only. Given that we're breaking the API already it seems fine to break anything "beneath" that in terms of exposure. |
Signed-off-by: Justin Chadwell <[email protected]> Signed-off-by: Christian Schlatter <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
Signed-off-by: Justin Chadwell <[email protected]>
This adds a sanity check to check that when we connect to a remote buildkit instance, that it's running the dagger engine, and not a vanilla instance of buildkit.
See #5852 (comment):
We should hard fail on this kind of scenario, since it's possible to detect this by inspecting the
Packagevalue from buildkit'sInfocall. However, to do this, I've had to change the meaning ofPackageto contain the go package name, and smuggle the engine name through theRevisionfield. This would make this a breaking change for users with mismatched cli and engine versions - I'm not sure if this is important, if it is, we could do a weaker form of the check and just fail on the case thatinfo.BuildkitVersion.Package == "github.com/moby/buildkit".It might be useful to upstream the "engine name" functionality into buildkit (e.g. jedevc/buildkit@f0fe58a), to avoid the need to smuggle through another field, wdyt @sipsma?