Skip to content

revendor BuildKit (master branch)#42473

Merged
AkihiroSuda merged 6 commits intomoby:masterfrom
thaJeztah:unfork_buildkit
Jun 17, 2021
Merged

revendor BuildKit (master branch)#42473
AkihiroSuda merged 6 commits intomoby:masterfrom
thaJeztah:unfork_buildkit

Conversation

@thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jun 5, 2021

relates to #42471

depends on:

Updates:

@thaJeztah
Copy link
Member Author

Missing a vendor

[2021-06-05T20:01:38.922Z] vendor/google.golang.org/genproto/googleapis/rpc/status/status.pb.go:28:2: cannot find package "google.golang.org/protobuf/reflect/protoreflect" in any of:
[2021-06-05T20:01:38.922Z] 	/go/src/github.com/docker/docker/vendor/google.golang.org/protobuf/reflect/protoreflect (vendor tree)
[2021-06-05T20:01:38.922Z] 	/usr/local/go/src/google.golang.org/protobuf/reflect/protoreflect (from $GOROOT)
[2021-06-05T20:01:38.922Z] 	/go/src/google.golang.org/protobuf/reflect/protoreflect (from $GOPATH)

@thaJeztah thaJeztah force-pushed the unfork_buildkit branch 2 times, most recently from 42d8063 to 701e18b Compare June 7, 2021 07:30
@thaJeztah
Copy link
Member Author

thaJeztah commented Jun 7, 2021

dropping the genproto bump for now (see if it works without that bump) and moved that to #42475

@thaJeztah
Copy link
Member Author

Local changes needed;


[2021-06-07T07:31:47.776Z] # github.com/docker/docker/builder/builder-next/worker
[2021-06-07T07:31:47.776Z] builder/builder-next/worker/worker.go:194:26: not enough arguments in call to ops.NewSourceOp
[2021-06-07T07:31:47.776Z] 	have (solver.Vertex, *pb.Op_Source, *pb.Platform, *source.Manager, *session.Manager, *Worker)
[2021-06-07T07:31:47.776Z] 	want (solver.Vertex, *pb.Op_Source, *pb.Platform, *source.Manager, *semaphore.Weighted, *session.Manager, worker.Worker)
[2021-06-07T07:31:47.776Z] builder/builder-next/worker/worker.go:196:24: not enough arguments in call to ops.NewExecOp
[2021-06-07T07:31:47.776Z] 	have (solver.Vertex, *pb.Op_Exec, *pb.Platform, cache.Manager, *session.Manager, *"github.com/docker/docker/vendor/github.com/moby/buildkit/cache/metadata".Store, executor.Executor, *Worker)
[2021-06-07T07:31:47.776Z] 	want (solver.Vertex, *pb.Op_Exec, *pb.Platform, cache.Manager, *semaphore.Weighted, *session.Manager, *"github.com/docker/docker/vendor/github.com/moby/buildkit/cache/metadata".Store, executor.Executor, worker.Worker)
[2021-06-07T07:31:47.776Z] builder/builder-next/worker/worker.go:198:24: not enough arguments in call to ops.NewFileOp
[2021-06-07T07:31:47.776Z] 	have (solver.Vertex, *pb.Op_File, cache.Manager, *"github.com/docker/docker/vendor/github.com/moby/buildkit/cache/metadata".Store, *Worker)
[2021-06-07T07:31:47.776Z] 	want (solver.Vertex, *pb.Op_File, cache.Manager, *semaphore.Weighted, *"github.com/docker/docker/vendor/github.com/moby/buildkit/cache/metadata".Store, worker.Worker)
script returned exit code 2

Comment on lines +194 to +201
Copy link
Member Author

Choose a reason for hiding this comment

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

@tonistiigi @AkihiroSuda I could use some help here; this relates to moby/buildkit#2049. Is there any value I should pass here? If so; where do I get this from?

Copy link
Member

Choose a reason for hiding this comment

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

Should be safe to ignore and pass nil. Later you may connect this to dockerd configuration option.

Copy link
Member

Choose a reason for hiding this comment

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

You can just pass nil though, don't need a var.

@thaJeztah
Copy link
Member Author

These failures look related. Sounds like the test is not setting all options that the code expects;

=== Failed
=== FAIL: builder/dockerfile TestRunIgnoresHealthcheck (0.00s)
    dispatchers_test.go:571: assertion failed: error is not nil: no mount state

=== FAIL: builder/dockerfile TestDispatchUnsupportedOptions/RUN_with_unsupported_options (0.00s)
    --- FAIL: TestDispatchUnsupportedOptions/RUN_with_unsupported_options (0.00s)
        dispatchers_test.go:607: assertion failed: expected error "the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled", got "no mount state"
            no mount state

=== FAIL: builder/dockerfile TestDispatchUnsupportedOptions (0.00s)

=== FAIL: libnetwork/iptables TestExistsRaw (0.06s)
    iptables_test.go:288: Failed to detect rule. i=3

@thaJeztah
Copy link
Member Author

Looks related to moby/buildkit#2089

Looks like this is impossible to test currently, or at least I don't know how;

  • failure is in runMountPostHook(), which calls getMountState(); if that returns nil, it produces an error
  • getMountState() calls cmd.getExternalValue(mountsKey), which returns cmd.m["dockerfile/run/mounts"]
  • cmd.m is set by cmd.setExternalValue() as part of runMountPreHook()

All off these; both types, accessors, and properties are non-exported, so these tests are no longer able to mock things

@thaJeztah
Copy link
Member Author

@tonistiigi I could use some help on this one; perhaps you have an idea how to fix this

@thaJeztah

This comment has been minimized.

@thaJeztah

This comment has been minimized.

@thaJeztah thaJeztah changed the title [WIP] revendor BuildKit (master branch) revendor BuildKit (master branch) Jun 15, 2021
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah marked this pull request as ready for review June 16, 2021 06:28
@thaJeztah thaJeztah requested a review from tonistiigi as a code owner June 16, 2021 06:28
@thaJeztah
Copy link
Member Author

@tonistiigi @AkihiroSuda PTAL - this is ready for review now (and green)

@AkihiroSuda AkihiroSuda merged commit 9e8cf10 into moby:master Jun 17, 2021
@thaJeztah thaJeztah deleted the unfork_buildkit branch June 17, 2021 08:15
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.

3 participants