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 golang env setup to node e2e #99874

Merged
merged 1 commit into from Mar 6, 2021

Conversation

ehashman
Copy link
Member

@ehashman ehashman commented Mar 6, 2021

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Without it, node e2e tests fail to run for me locally:

ehashman@red-dot:~/src/k8s$ make test-e2e-node FOCUS="\[NodeConformance\]|\[NodeAlphaFeature:.+\]" SKIP="\[Flaky\]|\[Serial\]" TEST_ARGS='--feature-gates=AllAlpha=true,CSIMigration=false,RotateKubeletServerCertificate=false'
+++ [0305 15:57:59] Building go targets for linux/amd64:
    vendor/github.com/onsi/ginkgo/ginkgo
Creating artifacts directory at /tmp/_artifacts/210305T155809
Test artifacts will be written to /tmp/_artifacts/210305T155809
No need to refresh sudo credentials
test/e2e_node/runner/local/run_local.go:31:2: cannot find package "k8s.io/klog/v2" in any of:
	/home/ehashman/.local/go-1.16/src/k8s.io/klog/v2 (from $GOROOT)
	/home/ehashman/go/src/k8s.io/klog/v2 (from $GOPATH)
test/e2e_node/runner/local/run_local.go:27:2: cannot find package "k8s.io/kubernetes/test/e2e_node/builder" in any of:
	/home/ehashman/.local/go-1.16/src/k8s.io/kubernetes/test/e2e_node/builder (from $GOROOT)
	/home/ehashman/go/src/k8s.io/kubernetes/test/e2e_node/builder (from $GOPATH)
test/e2e_node/runner/local/run_local.go:28:2: cannot find package "k8s.io/kubernetes/test/e2e_node/system" in any of:
	/home/ehashman/.local/go-1.16/src/k8s.io/kubernetes/test/e2e_node/system (from $GOROOT)
	/home/ehashman/go/src/k8s.io/kubernetes/test/e2e_node/system (from $GOPATH)
test/e2e_node/runner/local/run_local.go:29:2: cannot find package "k8s.io/kubernetes/test/utils" in any of:
	/home/ehashman/.local/go-1.16/src/k8s.io/kubernetes/test/utils (from $GOROOT)
	/home/ehashman/go/src/k8s.io/kubernetes/test/utils (from $GOPATH)
make: *** [Makefile:270: test-e2e-node] Error 1

Technically I'm maybe supposed to use kubetest? idk?

Which issue(s) this PR fixes:

This patch fixes the above issue. Not sure if this is the best way to do this but it works!

Special notes for your reviewer:

n/a

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


/cc @BenTheElder
/sig node testing

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 6, 2021
@ehashman
Copy link
Member Author

ehashman commented Mar 6, 2021

/priority backlog

@k8s-ci-robot k8s-ci-robot added priority/backlog Higher priority than priority/awaiting-more-evidence. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Mar 6, 2021
@BenTheElder
Copy link
Member

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 6, 2021
@BenTheElder
Copy link
Member

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 6, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder, ehashman

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 6, 2021
@ehashman
Copy link
Member Author

ehashman commented Mar 6, 2021

/retest
flakes...

@BenTheElder
Copy link
Member

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/99874/pull-kubernetes-unit/1367990215217516544
=> filed #99877 (doesn't appear to have an existing issue)

https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/99874/pull-kubernetes-node-e2e/1367990215259459584/
=> #98649

(cross linking the existing one as well for visibility on occurrences).

@bobbypage
Copy link
Member

bobbypage commented Mar 6, 2021

/lgtm

nice. You can also invoke test/e2e_node/runner/remote/run_remote.go manually to more closely mirror the tests on prow like noted in #99805 (comment)

I had same issues as you noted, had to set GO111MODULE=on to run it manually (from within GOPATH)

@k8s-ci-robot k8s-ci-robot merged commit 849f82d into kubernetes:master Mar 6, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.21 milestone Mar 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/backlog Higher priority than priority/awaiting-more-evidence. release-note-none Denotes a PR that doesn't merit a release note. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants