-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Internalize vendor/github.com/docker/machine #21647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: afbjorklund
Once this PR has been reviewed and has the lgtm label, please assign comradeprogrammer for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
37ce4f6
to
6ae4e88
Compare
Skip the host version v0-v2 migration code and os provisioners. Also skip all the version handling, for downloading boot2docker. Only copy the hyperv and virtualbox drivers actually being used. There is an "errdriver" that is only used for internal testing. Import github.com/Parallels/docker-machine-parallels/v2 Import github.com/machine-drivers/docker-machine-driver-vmware
6ae4e88
to
130c636
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afbjorklund are we leaving out the vmware and parellles drivers ? if yes, could we import them too ?
are we leaving out the vmware and parellles drivers ?
In this PR, they are included (with their original LICENSE)
But in order to test them, you would probably need to get some CI licenses from the vendor?
Only the machine drivers are included, not the actual hypervisor and their control programs...
@afbjorklund we would need to fix the licenses, maybe we can slap our own boilerplate on the top of the file ? could a file have two linceses ?
Parallells might be harder, since it is using a different license (MIT, rather than Apache-2.0)
Copyright (c) 2015-2020 Parallels IP Holdings GmbH.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
But you already have all of this under vendor
, so it is only a question of reporting (or not)
vendor/github.com/Parallels/docker-machine-parallels/v2/LICENSE
vendor/github.com/machine-drivers/docker-machine-driver-vmware/LICENSE
We could do something similar:
/* Copyright 2017 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /* * Copyright 2017 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. */
When the project is under both the MIT and Apache license, then it is sufficient to call your project Apache 2 licensed: the terms of the Apache license are a superset of the MIT license terms. However, you still have to keep any existing MIT license notices intact.
Copyright (c) 2015-2020 Parallels IP Holdings GmbH.
Same for the Apache license notices:
Copyright 2017 VMware, Inc. All rights reserved.
Copyright 2014 Docker, Inc.
601d6d1
to
3eafd42
Compare
/ok-to-test
/ok-to-test
@afbjorklund the cross build fails, I think we might need to remove building the kvm drivers from the cross build script
14:42:06 Digest: sha256:a0655d9b3aea65de70e5391abe468634da3c7d32a234902661eff6fce7bbd669
14:43:33 Status: Downloaded newer image for quay.io/nirsof/xcgo:jammy-v2
14:43:33 GOOS=darwin CGO_ENABLED=1 go build \
14:43:33 -ldflags="-X k8s.io/minikube/pkg/drivers/hyperkit.version=v1.37.0 -X k8s.io/minikube/pkg/drivers/hyperkit.gitCommitID="97234082a2b717645e4c65b81176aa798a9226b4"" \
14:43:43 -o out/docker-machine-driver-hyperkit k8s.io/minikube/cmd/drivers/hyperkit
14:43:43 chmod +X out/docker-machine-driver-kvm2-amd64
14:43:43 chmod +X out/docker-machine-driver-kvm2-amd64
14:43:43 cp out/docker-machine-driver-kvm2-amd64 out/docker-machine-driver-kvm2
14:43:43 cp -r installers/linux/deb/kvm2_deb_template out/docker-machine-driver-kvm2_1.37.0
14:43:43 chmod 0755 out/docker-machine-driver-kvm2_1.37.0/DEBIAN
14:43:43 sed -E -i -e 's/--VERSION--/1.37.0/g' out/docker-machine-driver-kvm2_1.37.0/DEBIAN/control
14:43:43 sed -E -i -e 's/--ARCH--/'amd64'/g' out/docker-machine-driver-kvm2_1.37.0/DEBIAN/control
14:43:43 mkdir -p out/docker-machine-driver-kvm2_1.37.0/usr/bin
14:43:43 cp out/docker-machine-driver-kvm2-amd64 out/docker-machine-driver-kvm2_1.37.0/usr/bin/docker-machine-driver-kvm2
14:43:43 fakeroot dpkg-deb --build out/docker-machine-driver-kvm2_1.37.0 out/docker-machine-driver-kvm2_1.37.0-0_amd64.deb
14:43:43 dpkg-deb: building package 'docker-machine-driver-kvm2' in 'out/docker-machine-driver-kvm2_1.37.0-0_amd64.deb'.
14:43:43 rm -rf out/docker-machine-driver-kvm2_1.37.0
14:43:43 cp out/docker-machine-driver-kvm2_1.37.0-0_amd64.deb out/docker-machine-driver-kvm2_1.37.0.deb
14:43:43 make: 'out/docker-machine-driver-kvm2_1.37.0-0_amd64.deb' is up to date.
14:43:45 # k8s.io/minikube/pkg/libmachine/shell
14:43:45 pkg/libmachine/shell/shell_windows.go:68:6: Detect redeclared in this block
14:43:45 pkg/libmachine/shell/shell.go:33:6: other declaration of Detect
14:43:46 make: *** [Makefile:280: out/minikube-windows-amd64] Error 1
14:43:46 make: *** [Makefile:277: out/minikube-windows-amd64] Error 2
14:43:46 make: *** Waiting for unfinished jobs....
14:43:46 + failed=2
14:43:46 +++ go env GOOS
14:43:48 +++ go env GOARCH
14:43:48 ++ out/minikube-linux-amd64 version
14:43:48 + BUILT_VERSION='minikube version: v1.37.0
14:43:48 commit: 97234082a2b717645e4c65b81176aa798a9226b4'
14:43:49 + echo minikube version: v1.37.0 commit: 97234082a2b717645e4c65b81176aa798a9226b4
14:43:49 minikube version: v1.37.0 commit: 97234082a2b717645e4c65b81176aa798a9226b4
14:43:49 ++ echo minikube version: v1.37.0 commit: 97234082a2b717645e4c65b81176aa798a9226b4
14:43:49 ++ grep commit:
++ awk '{print 2ドル}'
+ COMMIT=version:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@afbjorklund the script that jenkins fails on is
hack/jenkins/minikube_cross_build_and_upload.sh
I think we will need to remove these lines
I think we will need to remove these lines
out/docker-machine-driver-kvm2_$(make deb_version_base).deb
Why, they are for a different build step?
make: 'out/docker-machine-driver-kvm2_1.37.0-0_amd64.deb' is up to date.
I can't repeat the failure locally, normally.
GOOS="windows" GOARCH="amd64" go build -tags "" -a ./pkg/libmachine/shell/...
The only way is by provoking the compiler:
$ GOOS="windows" GOARCH="amd64" go build -tags "" -a ./pkg/libmachine/shell/*.go # command-line-arguments pkg/libmachine/shell/shell_windows.go:52:6: Detect redeclared in this block pkg/libmachine/shell/shell.go:17:6: other declaration of Detect
Since "shell.go" is supposed to be ignored:
// +build !windows package shell
GOOS="windows" GOARCH="amd64" \ go build -tags "" -ldflags="-X k8s.io/minikube/pkg/version.version=v1.37.0 -X k8s.io/minikube/pkg/version.isoVersion=v1.37.0-1760609724-21757 -X k8s.io/minikube/pkg/version.gitCommitID="75d6e112bff2fff720b9eff8eb12aff9a42ec072" -X k8s.io/minikube/pkg/version.storageProvisionerVersion=v5" -a -o out/minikube-windows-amd64 k8s.io/minikube/cmd/minikube
Ah, it was the "boilerplate" copyright script that broke it - by adding itself before the +build
line.
Apparently the script only handles the new-style go:build
, but not the old-style +build
used here.
--- a/pkg/libmachine/shell/shell.go +++ b/pkg/libmachine/shell/shell.go @@ -1,3 +1,5 @@ +//go:build !windows + /* Copyright 2022 The Kubernetes Authors All rights reserved. @@ -14,8 +16,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// +build !windows - package shell import (
I fixed the other places, but didn't test windows.
3eafd42
to
29e463f
Compare
@afbjorklund: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
minikube-pr-bot
commented
Oct 17, 2025
kvm2 driver with docker runtime
error collecting results for kvm2 driver: timing run 0 with minikube (PR 21647): timing cmd: [/home/jenkins/.minikube/minikube-binaries/21647/minikube addons enable ingress]: waiting for minikube: exit status 11
docker driver with docker runtime
error downloading artifacts: artifact download start: exit status 81docker driver with containerd runtime
error downloading artifacts: artifact download start: exit status 81
minikube-pr-bot
commented
Oct 17, 2025
Here are the number of top 10 failed tests in each environments with lowest flake rate.
Besides the following environments also have failed tests:
To see the flake rates of all tests by environment, click here. |
Uh oh!
There was an error while loading. Please reload this page.
Skip the host version v0-v2 migration code and os provisioners.
Also skip all the version handling, for downloading boot2docker.
Only copy the hyperv and virtualbox drivers actually being used.
Import github.com/Parallels/docker-machine-parallels/v2
Drop the "version" since it is not needed anymore.
Import github.com/machine-drivers/docker-machine-driver-vmware
Drop the "config" subdirectory from the module path.
This PR goes well with dropping hyperkit and internalizing kvm:
Remove the deprecated hyperkit driver #21603
kvm: Convert to internal driver #21625
Issue #21619
Before #21637