Skip to content

Pass the current snapshotter to the buildkit worker#52

Merged
ndeloof merged 1 commit intoc8dfrom
fix-build-snapshotter
Aug 10, 2022
Merged

Pass the current snapshotter to the buildkit worker#52
ndeloof merged 1 commit intoc8dfrom
fix-build-snapshotter

Conversation

@rumpl
Copy link
Copy Markdown
Owner

@rumpl rumpl commented Aug 10, 2022

If buildkit uses a different snapshotter we can't list the images any
more because we can't find the snapshot.

If buildkit uses a different snapshotter we can't list the images any
more because we can't find the snapshot.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Copy link
Copy Markdown
Collaborator

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

left one suggestion (for GoDoc), and a question that's probably not an issue

@@ -78,6 +78,7 @@ type Opt struct {
DNSConfig config.DNSConfig
ApparmorProfile string
UseSnapshotter bool
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprised that the linter didn't trip over these not being documented (🤷‍♂️ )

If we do want to add GoDoc, perhaps we should describe this as the default snapshotter that's used (with in mind that these may be overridable?)

Comment on lines 309 to +310
UseSnapshotter: d.UsesSnapshotter(),
Snapshotter: d.ImageService().GraphDriverName(),
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If d.UsesSnapshotter() == false we still set Snapshotter, looks like that can't do any harm, correct?

(related to that; if we would set Snapshotter conditionally, we may not need the UseSnapshotter, as it would be the same as if Snapshotter != "").

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the Snapshotter is not used if d.UsesSnapshotter() == false. I agree it's kinda weird passing something that could or not be used. I'm not sure we should have put two different things in the same place (current graph driver vs current snapshotter).

@ndeloof ndeloof merged commit 1f34a50 into c8d Aug 10, 2022
@rumpl rumpl deleted the fix-build-snapshotter branch November 22, 2022 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants