Skip to content

vendor buildkit v0.10.0#43239

Merged
thaJeztah merged 6 commits intomoby:masterfrom
crazy-max:buildkit-0.10
Mar 24, 2022
Merged

vendor buildkit v0.10.0#43239
thaJeztah merged 6 commits intomoby:masterfrom
crazy-max:buildkit-0.10

Conversation

@crazy-max
Copy link
Copy Markdown
Member

@crazy-max crazy-max commented Feb 15, 2022

@crazy-max crazy-max force-pushed the buildkit-0.10 branch 6 times, most recently from d1e159c to 013bbff Compare February 15, 2022 14:21
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.

some quick comments (my browser doesn't like reviewing the diff, so let me post some of them already; will have a closer look later)


const (
keyImageName = "name"
keyImageName = "name"
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.

Are these options unique to the integration in moby, or would conversion / definition of these be something we should move to buildkit at some point?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah while working on this PR I thought about moving the moby exporter to https://github.com/moby/buildkit/tree/master/exporter. Maybe we could expose some bits on BuildKit in the meantime.

@crazy-max crazy-max force-pushed the buildkit-0.10 branch 4 times, most recently from 449f779 to 25bb0ff Compare February 15, 2022 15:17
@crazy-max
Copy link
Copy Markdown
Member Author

Ok we have the same issues with swarm tests: https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43239/11/pipeline/346#step-349-log-1332 like #42983 (comment)

[](https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43239/11/pipeline/346#step-349-log-1333)[](https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43239/11/pipeline/346#step-349-log-1334)[](https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43239/11/pipeline/346#step-349-log-1335)[](https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43239/11/pipeline/346#step-349-log-1336)[](https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43239/11/pipeline/346#step-349-log-1337)=== Failed

[2022-02-15T15:36:22.526Z] === FAIL: arm64.integration.service TestCreateServiceSecretFileMode (12.06s)

[2022-02-15T15:36:22.526Z]     create_test.go:294: assertion failed: string "\x03\x00\x00\x00\x00\x00\x00\xc2Error grabbing logs: rpc error: code = Unknown desc = warning: incomplete log stream. some logs could not be retrieved for the following reasons: node fe09fk6y4w8myh53ocb2viaoj is not available\n" does not contain "-rwxrwxrwx"

[2022-02-15T15:36:22.526Z] 

[2022-02-15T15:36:22.526Z] === FAIL: arm64.integration.service TestCreateServiceConfigFileMode (12.07s)

[2022-02-15T15:36:22.526Z]     create_test.go:351: assertion failed: string "\x03\x00\x00\x00\x00\x00\x00\xc2Error grabbing logs: rpc error: code = Unknown desc = warning: incomplete log stream. some logs could not be retrieved for the following reasons: node qrbt4wmhhxymcpydrnjg7aubv is not available\n" does not contain "-rwxrwxrwx"

Will add a commit using my fork of swarmkit (even with failed raft test) to see how it goes.

@crazy-max

This comment was marked as outdated.

@tonistiigi
Copy link
Copy Markdown
Member

This needs the additional patches for MergeOp/DiffOp from @sipsma . If we want to test sooner and reduce patch size we can first vendor the commit before MergeOp was merged.

@sipsma
Copy link
Copy Markdown
Contributor

sipsma commented Feb 15, 2022

Commits needed to support changes made during mergeop:

Same but for DiffOp:

The changes needed to get the hardlink optimization working are here but are rough, need some cleanup:

Let me know if I can help out cleaning the hardlink optimization commit up.

@crazy-max
Copy link
Copy Markdown
Member Author

Thanks @sipsma!

@crazy-max crazy-max force-pushed the buildkit-0.10 branch 2 times, most recently from d6ed26e to a3a3b75 Compare March 22, 2022 13:15
@crazy-max crazy-max marked this pull request as ready for review March 22, 2022 15:10
@crazy-max crazy-max requested a review from tianon as a code owner March 22, 2022 15:10
@crazy-max
Copy link
Copy Markdown
Member Author

Seems like a flaky test on win-2022-c8d: https://ci-next.docker.com/public/blue/organizations/jenkins/moby/detail/PR-43239/45/pipeline#step-271-log-1702

Are you aware of this one @thaJeztah?

[2022-03-22T14:41:24.835Z] === Failed
[2022-03-22T14:41:24.835Z] === FAIL: github.com/docker/docker/integration-cli TestDockerSuite/TestRunContainerWithRmFlagCannotStartContainer (2.65s)
[2022-03-22T14:41:24.835Z]     docker_cli_run_test.go:2770: Expected not to have containers 918947e84a9f
[2022-03-22T14:41:24.835Z]         
[2022-03-22T14:41:24.835Z]     --- FAIL: TestDockerSuite/TestRunContainerWithRmFlagCannotStartContainer (2.65s)
[2022-03-22T14:41:24.835Z] 
[2022-03-22T14:41:24.835Z] === FAIL: github.com/docker/docker/integration-cli TestDockerSuite (3009.20s)

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Copy link
Copy Markdown
Member

@tonistiigi tonistiigi left a comment

Choose a reason for hiding this comment

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

Make sure the leftover mergeop/hardlink issue is tracked in moby with 22.x milestone so we can get this in for early testing.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
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 - left some notes about things we should look into in follow-ups

if description := layer.GetDescription(); description != "" {
meta.description = description
} else {
meta.description = "created by buildkit" // shouldn't be shown but don't fail build
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.

Was wondering if we use this information anywhere (and if so, if this at some point should include the buildkit version)


ulimits, err := toBuildkitUlimits(opt.Options.Ulimits)
if err != nil {
return nil, err
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.

These are also the ones we need to start looking at to return a correct error-type (InvalidParam()); per my other comment; there's a lot of those already, so let's make an effort to clean that up in some sweeps.

}

// toBuildkitUlimits converts ulimits from docker type=soft:hard format to buildkit's csv format
func toBuildkitUlimits(inp []*units.Ulimit) (string, error) {
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... hmm... so actually looks like this never return an error? ok to fix later (somewhat surprised there's no longer complaining)

dt, err = json.Marshal(cache)
dt, err := json.Marshal(cache)
if err != nil {
return nil, errors.Wrap(err, "failed to marshal cache")
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.

Somewhat curious why you removed the wrapping here (seems like the additional context could be useful); not a blocker, but add it to the list of things to look at

@thaJeztah
Copy link
Copy Markdown
Member

Make sure the leftover mergeop/hardlink issue is tracked in moby with 22.x milestone so we can get this in for early testing.

tracked in #43415

@thaJeztah
Copy link
Copy Markdown
Member

Let's get this one in!

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.

(WSL2) docker build "output clipped, log limit 1MiB reached"

4 participants