Refactor controllers, moving them into a separate package#1579
Merged
Conversation
e9c2a87 to
9c91a77
Compare
Signed-off-by: Justin Chadwell <me@jedevc.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
9c91a77 to
5f130b2
Compare
tonistiigi
approved these changes
Feb 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
⬆️ Follow up-to #1296
Looks like this was less tricky than imagined 🎉
The core component of this PR is the creation of a new top-level package
controller:NewControllerto create a controller.controlcontains the interfaces and options definitions for controllers.localcontains the code for the Local buildx controller (running in-process)remotecontains the code for the Remote buildx controller (running out-of-process)buildcontains the high level logic to run the build - eventually at some point, it's likely this will probably only be called from within thecontrollerpackage. However, for now, we only use thelocalandremotecontrollers when in experimental mode, so we need to continue to properly expose this.There may be a better place for this? Not sure, but now that it's split out it should be very easy to move.
Ideally we can do this before too much more feature work, but it would be good to get an API surface that works.