nerdctl
nerdctl copied to clipboard
feat: use buildkit API for clean up build cache within `system prune`
Signed-off-by: Zhou Zhiqiang [email protected]
This PR does not change the logic of nerdctl builder prune, please let me know if we should also update it.
prev #1284
close #1279
I think this PR is ready for review! PTAL @junnplus @AkihiroSuda @fahedouch
https://github.com/containerd/nerdctl/pull/1284#issuecomment-1214188334
After integrating with buildkit API directly, I noticed that the size of nerdctl increased from 29M to 32M.
But introducing buildkit API would bring some dependency issue, for example, buildkit pinned docker with github.com/docker/docker => github.com/docker/docker v20.10.3-0.20220831131523-b5a0d7a188ac+incompatible, so we also have to pin on that version. I have tried to use v20.10.7 but it failed to compile because of some API changes.
needs rebase
needs rebase
Updated, PTAL!
Needs rebase
CI Windows/containerd-1.6 failed because it does not run buildkitd with windows container runtime.
What should I do? @AkihiroSuda
CI
Windows/containerd-1.6failed because it does not runbuildkitdwith windows container runtime.What should I do? @AkihiroSuda
The test should be skipped when buildkitd is missing.
Also please squash commits
Also please squash commits
Hi @AkihiroSuda, it seems we already used "Squash and Merge" so the origin commits would not be taken in the main branch as is. Or are there any other things that I should consider?
it seems we already used "Squash and Merge"
Untrue. We do not use this button, as we want to keep the commits including DCO sign-off as-is
it seems we already used "Squash and Merge"
Untrue. We do not use this button, as we want to keep the commits including DCO sign-off as-is
Oops, got that, I would try to rebase the commits on the latest main branch.
Thanks for your explanation. :heart:
Hi @AkihiroSuda, @Zheaoli, there are 2 unrelated testcase failed
- TestRunWithJsonFileLogDriver in test-integration-rootless (22.04, main)
- TestRunWithJsonFileLogDriver, TestRunWithJsonFileLogDriverAndLogPathOpt in test-integration-rootless (22.04, v1.6.10)
Maybe they are flaky tests, and give it a retry? PTAL, thanks!
Commits don't seem squashed
Commits don't seem squashed
Do I need to squash them into only 1 commit?
Commits don't seem squashed
Do I need to squash them into only 1 commit?
1 topic = 1 commit. This doesn't necessary mean that 1 PR = 1 commit, though.
I have
- removed the testcase condiitons for rootles containers
- squashed into 1 commit
PTAL @AkihiroSuda :heart:
BuildKit v0.11 will support buildctl du --format json, so maybe we will reopen https://github.com/containerd/nerdctl/pull/1284 after its GA
BuildKit v0.11 will support
buildctl du --format json, so maybe we will reopen #1284 after its GA
So you mean we still prefer to parse the JSON output rather than importing buildkit as a library?
BuildKit v0.11 will support
buildctl du --format json, so maybe we will reopen #1284 after its GASo you mean we still prefer to parse the JSON output rather than importing buildkit as a library?
Yes, that might be better to avoid the replace() hell in go.mod