remove buildkit as dependency from the CLI (integrate github.com/moby/buildkit/util/appcontext)#4457
Merged
thaJeztah merged 2 commits intodocker:masterfrom Sep 27, 2023
Merged
Conversation
thaJeztah
commented
Jul 20, 2023
This was referenced Jul 25, 2023
This was referenced Aug 22, 2023
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #4457 +/- ##
=======================================
Coverage 59.70% 59.70%
=======================================
Files 288 288
Lines 24816 24816
=======================================
Hits 14817 14817
Misses 9113 9113
Partials 886 886 |
942338b to
496554c
Compare
6b97040 to
6fde6ce
Compare
Member
Author
|
Quick blurb, because we discussed this in one of the maintainers calls with @tonistiigi @neersighted (and others, but they may recall the exact details);
|
6fde6ce to
a8c90b3
Compare
This copies the github.com/moby/buildkit/util/appcontext
package as an internal package. The appcontext package from
BuildKit was the only remaining dependency on BuildKit, and
while we may need some of its functionality, the implementation
is not correct for how it's used in docker/cli (so would need
a rewrite).
Moving a copy of the code into the docker/cli (but as internal
package to prevent others from depending on it) is a first step
in that process, and removes the circular dependency between
BuildKit and the CLi.
We are only using these:
tree vendor/github.com/moby/buildkit
vendor/github.com/moby/buildkit
├── AUTHORS
├── LICENSE
└── util
└── appcontext
├── appcontext.go
├── appcontext_unix.go
├── appcontext_windows.go
└── register.go
3 directories, 6 files
Before this:
go mod graph | grep ' github.com/docker/cli'
github.com/moby/buildkit@v0.11.6 github.com/docker/cli@v23.0.0-rc.1+incompatible
After this:
go mod graph | grep ' github.com/docker/cli'
# (nothing)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
a8c90b3 to
112d79a
Compare
Member
Author
|
@tonistiigi @neersighted PTAL; this keeps the status-quo on the functionality and does not fix the issues that were discussed about appcontext, but does remove the BuildKit dependency, which I think may be worth considering. I updated the PR to move the appcontext package to |
neersighted
approved these changes
Sep 27, 2023
Member
Author
|
Let me bring this one in; we can use #4402 as tracking issue for the remaining work |
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.
This copies the github.com/moby/buildkit/util/appcontext
package as an internal package. The appcontext package from
BuildKit was the only remaining dependency on BuildKit, and
while we may need some of its functionality, the implementation
is not correct for how it's used in docker/cli (so would need
a rewrite).
Moving a copy of the code into the docker/cli (but as internal
package to prevent others from depending on it) is a first step
in that process, and removes the circular dependency between
BuildKit and the CLi.
We are only using these:
Before this:
After this:
But indirect dependencies and circular dependency on moby/moby -> buildkit -> moby/moby and docker/cli can cause "hell".
- A picture of a cute animal (not mandatory but encouraged)