Skip to content

vendor: buildkit v0.11.4-0.20230228113103-218e934edfba#45095

Merged
thaJeztah merged 2 commits intomoby:masterfrom
vvoland:vendor-buildkit-0.11.4-pre
Mar 3, 2023
Merged

vendor: buildkit v0.11.4-0.20230228113103-218e934edfba#45095
thaJeztah merged 2 commits intomoby:masterfrom
vvoland:vendor-buildkit-0.11.4-pre

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Mar 2, 2023

changes: moby/buildkit@v0.11.3...218e934

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

@vvoland
Copy link
Copy Markdown
Contributor Author

vvoland commented Mar 2, 2023

Linter failure:

builder/builder-next/exporter/writer.go:10:13: SA1019: "github.com/moby/buildkit/util/buildinfo/types" is deprecated: Build information is deprecated: https://github.com/moby/buildkit/blob/master/docs/deprecated.md (staticcheck)
	binfotypes "github.com/moby/buildkit/util/buildinfo/types"

We're practically importing this one for one const:

const ImageConfigField = "moby.buildkit.buildinfo.v1"

I don't see any other package in buildkit which defines this one, so I guess we should just inline it?
We already do that for other fields, like:

m["moby.buildkit.cache.v0"] = dt

Related PR: moby/buildkit#3614

\cc @crazy-max

@vvoland vvoland requested a review from tonistiigi as a code owner March 2, 2023 15:23
@crazy-max
Copy link
Copy Markdown
Member

@vvoland Yes you can inline it in the meantime. This feature will be removed for next 0.12, see moby/buildkit#3582.

See also https://github.com/moby/buildkit/blob/v0.11/docs/deprecated.md#build-information

Comment on lines 18 to 20
// const (
// emptyGZLayer = digest.Digest("sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1")
// )
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Unrelated to this PR, but was this "no longer used" or "not yet used"?

Copy link
Copy Markdown
Contributor Author

@vvoland vvoland Mar 2, 2023

Choose a reason for hiding this comment

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

Looks like no longer used. Last reference to this was removed in: 0728fb2
So I'd say it's okay to remove?

// const (
// emptyGZLayer = digest.Digest("sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1")
// )
const imageConfigField = "moby.buildkit.buildinfo.v1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

So, slightly wondering;

  • As this is the master branch; does it already use the replacement? If so, perhaps we should (can we?) remove the functionality as a whole?
  • If we cannot remove it now, the alternative would be to add a //nolint:... (with a comment about the deprecation)

Advantage of the //nolint: would be that we deliberately make the build break once we would update BuildKit to v0.12, that way we don't accidentally forget about removing it once it's gone (whereas having a local const means we could still have (dead)code.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh it's the master branch. Then yeah better to remove it entirely. related commit: fda0226

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Yes, so this is master (23.1.0 "dev"), which will be the first release with BuildKit 0.11, but hasn't been released yet, so perhaps it's fine to deprecate/remove ahead of BuildKit.

So my suggestion would be;

  • Open a PR to mark the feature deprecated (from the "Docker Engine" perspective) in https://github.com/docker/cli/blob/master/docs/deprecated.md. We can probably mark it as "deprecated in v23.0.0", and "to be removed in v23.1.0" (as it was already deprecated in BuildKit, but we didn't mention it)
  • Remove it from master
  • Vendor buildkit v0.11 "latest"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But I could use feedback on that suggestion, as I'm not very familiar with the feature (and who/how it's used) 😅

@thaJeztah
Copy link
Copy Markdown
Member

Flaky test (just commenting to allow us finding it back)

=== FAIL: github.com/docker/docker/pkg/plugins TestClientWithRequestTimeout (0.01s)
    client_test.go:254: assertion failed: expected an error, got nil: expected error

@thaJeztah
Copy link
Copy Markdown
Member

This one can be rebased

vvoland added 2 commits March 3, 2023 11:05
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland force-pushed the vendor-buildkit-0.11.4-pre branch from 439389c to 3e4c4df Compare March 3, 2023 10:05
@vvoland
Copy link
Copy Markdown
Contributor Author

vvoland commented Mar 3, 2023

Rebased, are fine with sneaking the remove commented dead const in here, or should I make it a separate PR?

@thaJeztah
Copy link
Copy Markdown
Member

I see you did in a separate commit, and it's a trivial changes, so seems fine to keep it here

@thaJeztah thaJeztah added this to the v-next milestone Mar 3, 2023
Copy link
Copy Markdown
Member

@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

(we're temporarily ahead of the last BuildKit release, but there likely will be a v0.11.4 with some bug fixes before we release)

@thaJeztah
Copy link
Copy Markdown
Member

@rumpl @neersighted ptal 🤗

@thaJeztah
Copy link
Copy Markdown
Member

let me bring this one in to unblock #44079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants