-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
exporter: support unpack opt for image exporter #909
Conversation
afb1750
to
685bc32
Compare
is it related to environment? |
@fuweid run |
685bc32
to
54f7b49
Compare
@tonistiigi thanks!
but this diff is confusing me 😢 |
54f7b49
to
8165cba
Compare
@fuweid I think go mod might put packages in import order and that changed but not sure. |
@tonistiigi got it. will check this. The CI is pass, please take a look. But I find a flaky case here:
|
any update here? |
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.
LGTM but can you add a simple test(or modify an existing one to include this). Don't necessarily need to run the image, but at least make sure that we don't accidentally make the build fail when unpack
is set.
sure. will do it. |
@fuweid Need rebase as well after the userns update (sorry) |
@tonistiigi thanks for reminder. Still working on it. will update it. |
5eae111
to
2868ec6
Compare
ping @tonistiigi I modify the existing buildkit cmd case, PTAL. Thanks Hm.. I don't know why the CI is pass right now.😂 1 Hour ago, I have the issue like
is it good to use diff --git a/client/client_test.go b/client/client_test.go
index e7e4c3f..12811ea 100644
--- a/client/client_test.go
+++ b/client/client_test.go
@@ -1714,7 +1714,7 @@ func testBasicInlineCacheImportExport(t *testing.T, sb integration.Sandbox) {
require.Equal(t, ok, true)
// dgst3 != dgst, because inline cache is not exported for dgst3
- unique3, err := readFileInImage(c, "dummy@"+dgst3, "/unique")
+ unique3, err := readFileInImage(c, target, "/unique")
require.NoError(t, err)
require.EqualValues(t, unique, unique3)
} cc @AkihiroSuda |
I know why that CI can pass by retry. The containerd content is removed by gc. It might be delay. If the real content isn't removed by gc before fetch
If the content is still there, the fetcher will not file request to registry. Therefore, the CI can pass. 😂 Here is log. |
Are you saying that the test does not do what is expected at all, or are you pointing to a race when the second build happens on the same time with gc? I couldn't reproduce this locally but I can see that the second build does do fetches. Also added a sleep to make sure gc has run. If latter, then do you have an idea where the race is, opening a writer with errexist should block the gc from deleting the data even if it was marked for removal. |
3b0b8ee
to
c0c5a91
Compare
It is enhancement which allows to unpack image into containerd snapshotter storage by `--output type=image,<.>=<.>,unpack=true`. In order to support this feature, we needs to extend the Snapshotter witwh `Name() string` function. Because we needs to set gc label for snapshotter which need snapshotter name. fix: moby#908 Signed-off-by: Wei Fu <fuweid89@gmail.com>
c0c5a91
to
ffad8ad
Compare
@fuweid Is this ready from your side or do you want to investigate the test flakiness above more? |
hi @tonistiigi , I still want to investigate the flaky test case. When I am ready, I will ping you. Thanks! |
@tonistiigi @AkihiroSuda I cannot reproduce this flaky case. In my option, when we call the If the content isn't removed by gc, the next round However, I cannot reproduce this. 😂 If it is not blocked issue, please review the PR. Thanks. |
full diff: moby/buildkit@8818c67...v0.5.0 - moby/buildkit#909 exporter: support unpack opt for image exporter - moby/buildkit#961 dockerfile: allow subdirs for remote contexts Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: moby/buildkit@8818c67...v0.5.0 - moby/buildkit#909 exporter: support unpack opt for image exporter - moby/buildkit#961 dockerfile: allow subdirs for remote contexts Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 3e4723cf3395dcdaa4c98acba549ac0170899504 Component: engine
full diff: moby/buildkit@8818c67...v0.5.0 - moby/buildkit#909 exporter: support unpack opt for image exporter - moby/buildkit#961 dockerfile: allow subdirs for remote contexts Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 3e4723c) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: moby/buildkit@8818c67...v0.5.0 - moby/buildkit#909 exporter: support unpack opt for image exporter - moby/buildkit#961 dockerfile: allow subdirs for remote contexts Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 3e4723cf3395dcdaa4c98acba549ac0170899504) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: ea090084234de4776289445b6e648622d874c49a Component: engine
full diff: moby/buildkit@8818c67...v0.5.0 - moby/buildkit#909 exporter: support unpack opt for image exporter - moby/buildkit#961 dockerfile: allow subdirs for remote contexts Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
It is enhancement which allows to unpack image into containerd
snapshotter storage by
--output type=image,<.>=<.>,unpack=true
.In order to support this feature, we needs to extend the Snapshotter
witwh
Name() string
function. Because we needs to set gc label forsnapshotter which need snapshotter name.
fix: #908
Signed-off-by: Wei Fu fuweid89@gmail.com