Skip to content
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

Add docker on windows integration tests on github actions #6580

Merged
merged 31 commits into from
Apr 9, 2020

Conversation

alonyb
Copy link

@alonyb alonyb commented Feb 11, 2020

This PR will add integration tests for windows.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 11, 2020
@k8s-ci-robot
Copy link
Contributor

Hi @alonyb. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 11, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: alonyb
To complete the pull request process, please assign afbjorklund
You can assign the PR to them by writing /assign @afbjorklund in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@codecov-io
Copy link

codecov-io commented Feb 11, 2020

Codecov Report

Merging #6580 into master will increase coverage by 0.67%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6580      +/-   ##
==========================================
+ Coverage   37.19%   37.86%   +0.67%     
==========================================
  Files         146      147       +1     
  Lines        9106     9089      -17     
==========================================
+ Hits         3387     3442      +55     
+ Misses       5303     5222      -81     
- Partials      416      425       +9     
Impacted Files Coverage Δ
pkg/minikube/registry/global.go 58.69% <0.00%> (-22.56%) ⬇️
pkg/minikube/config/profile.go 70.07% <0.00%> (-5.52%) ⬇️
pkg/minikube/driver/driver.go 64.44% <0.00%> (-2.23%) ⬇️
pkg/minikube/localpath/localpath.go 15.15% <0.00%> (-2.09%) ⬇️
pkg/minikube/bootstrapper/certs.go 73.41% <0.00%> (-1.83%) ⬇️
cmd/minikube/cmd/start.go 36.16% <0.00%> (-1.54%) ⬇️
pkg/minikube/service/service.go 76.31% <0.00%> (-1.53%) ⬇️
cmd/minikube/cmd/status.go 20.49% <0.00%> (-1.06%) ⬇️
pkg/minikube/cruntime/crio.go 51.00% <0.00%> (-1.05%) ⬇️
cmd/minikube/cmd/node_add.go 21.73% <0.00%> (-0.99%) ⬇️
... and 52 more

@medyagh
Copy link
Member

medyagh commented Feb 11, 2020

I personally applaud the hard work you put in making this work ! thank you

@medyagh medyagh changed the title WIP: Add docker on windows worflow WIP: Add docker on windows worflow to github actions Feb 11, 2020
@medyagh
Copy link
Member

medyagh commented Feb 11, 2020

@alonyb I know this is WIP , but one early comment , the name of the job should be in form of
"Drivename_Platform"
like "docker_Windows_NT"
and no need to mention amd64.

and I wonder if the test needs to run with power user privileges or not...

@medyagh medyagh changed the title WIP: Add docker on windows worflow to github actions WIP: Add docker on windows integration tests on github actions Feb 11, 2020
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 14, 2020
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 14, 2020
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please sign in with your organization's credentials at https://identity.linuxfoundation.org/projects/cncf to be authorized.
  • If you have done the above and are still having issues with the CLA being reported as unsigned, please log a ticket with the Linux Foundation Helpdesk: https://support.linuxfoundation.org/
  • Should you encounter any issues with the Linux Foundation Helpdesk, send a message to the backup e-mail support address at: [email protected]

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/test-infra repository. I understand the commands that are listed here.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 16, 2020
@alonyb
Copy link
Author

alonyb commented Feb 17, 2020

the upload all report failed


 download results docker_windows_NT0s
##[error]Exit code 1 returned from process: file name '/home/runner/runners/2.164.0/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.DownloadArtifact, Runner.Plugins"'.
Run actions/download-artifact@v1
Downloading artifact 'docker_windows_NT' to: '/home/runner/work/minikube/minikube/docker_windows_NT'
##[error]An Artifact with name "docker_windows_NT" was not found.
##[error]Exit code 1 returned from process: file name '/home/runner/runners/2.164.0/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.DownloadArtifact, Runner.Plugins"'.

I fixed that.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 21, 2020
@blueelvis blueelvis self-requested a review February 23, 2020 06:01
@medyagh
Copy link
Member

medyagh commented Mar 7, 2020

@blueelvis any chance you could help with this ? can we run docker driver test on windows in github actions?

@tstromberg
Copy link
Contributor

Do you mind resolving the merge conflict?

@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 19, 2020
@alonyb
Copy link
Author

alonyb commented Mar 19, 2020

Do you mind resolving the merge conflict?

Resolved

@sharifelgamal
Copy link
Collaborator

This seems to be working now, any objections to merging?

@@ -88,7 +88,7 @@ func status() registry.State {
// Allow no more than 2 seconds for querying state
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()

Copy link
Member

Choose a reason for hiding this comment

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

Revert unrelated changes

Makefile Outdated
@@ -280,22 +280,45 @@ ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
$(call DOCKER,$(BUILD_IMAGE),/usr/bin/make $@)
endif
which go-bindata || GO111MODULE=off GOBIN="$(GOPATH)$(DIRSEP)bin" go get github.com/jteeuwen/go-bindata/...
ifeq ($(OS),Windows_NT)
Copy link
Member

Choose a reason for hiding this comment

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

Was this to make golint happy ? I rather this be not added to makefile.

Could be changed in a different place

run: |
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh.exe
shell: bash
- name: Download binaries
Copy link
Member

Choose a reason for hiding this comment

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

I would add a step here to make sure docker is installed and is healthy
maybe this

- name: install or check docer
  run: |

.... commands to install docker...
docker info || true
docker ps || true
...

Makefile Outdated
pkg/minikube/translate/translations.go: $(shell find "translations/" -type f)
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
$(call DOCKER,$(BUILD_IMAGE),/usr/bin/make $@)
endif
ifeq ($(OS),Windows_NT)
Copy link
Member

Choose a reason for hiding this comment

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

it is not clean to me why you had to modify the makefile to make this work ? is there any way to avoid this hack ?

name: minikube_binaries
- name: run integration test
continue-on-error: true
run: |
Copy link
Member

Choose a reason for hiding this comment

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

Pass the SHELL environment variable to this test like other one. So it passes the docker-env.

Also maybe rename the test to Docker_windows_shell

So in the future we can add another test called
Docker_windows_powershell

.github/workflows/main.yml Outdated Show resolved Hide resolved
numFail=$(echo $STAT | jq '.NumberOfFail')
echo "----------------${numFail} Failures----------------------------"
echo $STAT | jq '.FailedTests' || true
echo "--------------------------------------------"
Copy link
Member

Choose a reason for hiding this comment

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

since this PR we added ***Pass
please copy that part from other tests so it inludes the Passes Num

runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Download gopogh
Copy link
Member

Choose a reason for hiding this comment

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

Add a step to show docker version
and docker info
like other tests

@medyagh
Copy link
Member

medyagh commented Mar 26, 2020

@alonyb looking at the results it appears that it is using hyperv driver

TestOffline/group/crio: aab_offline_test.go:53: (dbg) Non-zero exit: minikube_binaries/minikube-windows-amd64.exe start -p offline-crio-20200319T130005.7313724-6744 --alsologtostderr -v=1 --memory=2000 --wait=true --container-runtime crio --vm-driver=hyperv: exit status 2 (22.5572825s)

.github/workflows/main.yml Outdated Show resolved Hide resolved
@alonyb alonyb requested a review from medyagh March 26, 2020 13:26
@tstromberg
Copy link
Contributor

I know it's partially broken right now, but I'm going to merge this as it's super important for us to iterate towards. Thank you for all of your hard work!

@tstromberg tstromberg merged commit 92d9bb4 into kubernetes:master Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants