vendor: update docker/cli to f1615fa#1224
Conversation
2a61bc1 to
50c81bf
Compare
|
@thaJeztah Maybe I should wait for docker/cli#3713 🤔 |
|
docker/cli#3713 was merged (note that I updated it to latest docker/docker in the v22.06 branch as well) |
| "github.com/docker/buildx/util/platformutil" | ||
| "github.com/docker/cli/cli/config" | ||
| "github.com/docker/docker/pkg/urlutil" | ||
| "github.com/docker/docker/builder/remotecontext/urlutil" |
There was a problem hiding this comment.
We should look at replacing this with something from BuildKit, e.g. https://github.com/moby/buildkit/blob/df49b648c8bfef657ba99543390516a3f518d22a/util/gitutil/git_protocol.go#L18
And/or move this package to BuildKit.
The documentation I put in the packege may be nice to preserve though, so if there's no equivalent in BuildKit; perhaps at least copy the docs; https://github.com/moby/moby/blob/7624f8aeb1836cd75a0912d9614930e8a59eaf4e/builder/remotecontext/urlutil/urlutil.go#L24-L75
| github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= | ||
| github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= | ||
| github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= | ||
| github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= |
There was a problem hiding this comment.
Updated bench results in https://github.com/crazy-max/docker-cli-bench to take that PR into account as well as latest changes from docker/cli (docker/cli@f1615fa) and it looks like it's actually slightly improved compared to v0.8.2:
docker buildx version:
v0.8.2~392mscrazy-max/buildx#update-docker-cli~364ms
But a bit worse compared to current changes on master branch:
docker buildx version:
docker/buildx#master~352mscrazy-max/buildx#update-docker-cli~364ms
Full bench:
BuildxVersion/buildx-0-v0.8.2-docker-19.03.15-32 524ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-20.10.0-32 482ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-20.10.12-32 489ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-20.10.17-32 488ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-22.xx-0-2b4ffb301bb1cdd1adeb321807e10a9c656f346e-32 295ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-22.xx-1-a09e61a247656c780d2ae487a276ea1761ceb85c-32 383ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-22.xx-2-84b86e23b7f520b0bb956df88331d6c8d472ce0e-32 362ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-22.xx-3-c59773f1551a8fd289538efc82274332f31f8c19-32 390ms ± 0%
BuildxVersion/buildx-0-v0.8.2-docker-22.xx-4-f1615facb1ca44e4336ab20e621315fc2cfb845a-32 392ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-19.03.15-32 491ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-20.10.0-32 456ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-20.10.12-32 474ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-20.10.17-32 457ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-22.xx-0-2b4ffb301bb1cdd1adeb321807e10a9c656f346e-32 275ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-22.xx-1-a09e61a247656c780d2ae487a276ea1761ceb85c-32 350ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-22.xx-2-84b86e23b7f520b0bb956df88331d6c8d472ce0e-32 351ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-22.xx-3-c59773f1551a8fd289538efc82274332f31f8c19-32 359ms ± 0%
BuildxVersion/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-docker-22.xx-4-f1615facb1ca44e4336ab20e621315fc2cfb845a-32 352ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-19.03.15-32 494ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-20.10.0-32 444ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-20.10.12-32 488ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-20.10.17-32 452ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-22.xx-0-2b4ffb301bb1cdd1adeb321807e10a9c656f346e-32 272ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-22.xx-1-a09e61a247656c780d2ae487a276ea1761ceb85c-32 354ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-22.xx-2-84b86e23b7f520b0bb956df88331d6c8d472ce0e-32 361ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-22.xx-3-c59773f1551a8fd289538efc82274332f31f8c19-32 374ms ± 0%
BuildxVersion/buildx-2-update-docker-cli-docker-22.xx-4-f1615facb1ca44e4336ab20e621315fc2cfb845a-32 364ms ± 0%There was a problem hiding this comment.
Any idea what changed between v0.8 and master?
What about the times in buildx itself. I assume in your times the main bottleneck is in compose-cli to docker-cli to buildx redirect and not in buildx itself.
Is the difference because buildx doesn't enable completions?
There was a problem hiding this comment.
Any idea what changed between v0.8 and master?
I will bisect and keep you posted
What about the times in buildx itself. I assume in your times the main bottleneck is in compose-cli to docker-cli to buildx redirect and not in buildx itself.
Here is the standalone bench result:
BuildxVersionStandalone/buildx-0-v0.8.2-32 489ms ± 0%
BuildxVersionStandalone/buildx-1-701c548e46348da2958104907c9572ea7ce6ab52-32 456ms ± 0%
BuildxVersionStandalone/buildx-2-update-docker-cli-32 457ms ± 0%
Looks quite odd to me 🤔
Complete bench results: https://github.com/crazy-max/docker-cli-bench#readme
Is the difference because buildx doesn't enable completions?
Good point will take a look at this
There was a problem hiding this comment.
Added v0.7.0 to bench results: https://github.com/crazy-max/docker-cli-bench#readme
BuildxVersionStandalone/buildx-0-v0.7.0-32 502ms ± 0%
BuildxVersionStandalone/buildx-1-v0.8.2-32 524ms ± 0%
BuildxVersionStandalone/buildx-2-701c548e46348da2958104907c9572ea7ce6ab52-32 501ms ± 0%
BuildxVersionStandalone/buildx-3-update-docker-cli-32 492ms ± 0%
I will run bench tests on a barebone system without Docker Desktop to see how it behaves.
also needs to update docker/docker to a60b458 (22.06 branch) otherwise build breaks since docker/cli#3512 with: # github.com/docker/cli/cli/flags vendor/github.com/docker/cli/cli/flags/common.go:40:37: undefined: client.EnvOverrideCertPath vendor/github.com/docker/cli/cli/flags/common.go:41:37: undefined: client.EnvTLSVerify vendor/github.com/docker/cli/cli/flags/common.go:89:76: undefined: client.EnvOverrideHost needs also to update github.com/spf13/cobra to v1.5.0 otherwise build breaks with: # github.com/docker/cli/cli-plugins/plugin vendor/github.com/docker/cli/cli-plugins/plugin/plugin.go:130:4: unknown field 'HiddenDefaultCmd' in struct literal of type cobra.CompletionOptions Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
50c81bf to
b0deb8b
Compare
|
Doing tests on an M1 system with latest Docker Desktop (4.10.1) gives results that make more sense:
For compose-cli tests the branch @tonistiigi I updated the test suite so you can run it on your system if you want: https://github.com/crazy-max/docker-cli-bench |
closes #1054
also needs to update docker/docker to a60b458 (22.06 branch) otherwise
build breaks since docker/cli#3512 with:
needs also to update github.com/spf13/cobra to v1.5.0 otherwise
build breaks with:
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com