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 go:build no windows for some control-plane related UT for kubeadm #112620

Merged
merged 1 commit into from Sep 27, 2022

Conversation

pacoxu
Copy link
Member

@pacoxu pacoxu commented Sep 21, 2022

What type of PR is this?

/kind failing-test
/kind cleanup

What this PR does / why we need it:

https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/ci-kubernetes-unit-windows-master/1569279943479660544

The failure

  • etcd.local.dataDir: Invalid value: "/var/lib/etcd": path is not absolute

Add //go:build !windows to files below, as we always run work node on windows(no control plane node)

  • cmd/kubeadm/app/cmd/certs_test.go (renew tests)
  • cmd/kubeadm/app/phases/controlplane/*
  • cmd/kubeadm/app/phases/etcd/

Which issue(s) this PR fixes:

parts of #112619

Special notes for your reviewer:

Some more test failures

  • common_test.go:386: unexpected failure: [certificatesDir: Invalid value: "/etc/kubernetes/pki": path is not absolute, etcd.local.dataDir: Invalid value: "/var/lib/etcd": path is not absolute]
  • panic: the environment variable KUBEADM_PATH must point to the kubeadm binary path
  • pki_helpers_test.go:573: unexpected certificate path: \foo\bar.csr
    

Does this PR introduce a user-facing change?

None

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 21, 2022
@k8s-ci-robot
Copy link
Contributor

@pacoxu: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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 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 Sep 21, 2022
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 21, 2022
@pacoxu
Copy link
Member Author

pacoxu commented Sep 21, 2022

When I look into https://storage.googleapis.com/k8s-triage/index.html?text=kubeadm, most are about windows ut.

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/approve
@claudiubelu

could you please help us with review / lgtm here

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123, pacoxu

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 Sep 21, 2022
@pacoxu
Copy link
Member Author

pacoxu commented Sep 26, 2022

Other fixes for the CI can be found in https://github.com/orgs/kubernetes/projects/99/views/1

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

another question here is - should we adapt the tests to work on windows instead of not compiling them?

@pacoxu
Copy link
Member Author

pacoxu commented Sep 26, 2022

another question here is - should we adapt the tests to work on windows instead of not compiling them?

In #111534, the fix is adding goruntime.GOOS != "windows" into the logic.

As we always run the work node on windows(no control plane node, correct me if I am wrong), I think some cases should never run on windows, so we can simply not compile them.

For other cases, I think we should adopt the tests and some are in progress of #111534 and #110863.

@neolit123
Copy link
Member

yes, we do not support windows control planes yet. but actually there some discussions about it with sig windows.

one problem if we don't compile the tests is that if we eventually add windows cp support we will forget about these tests. using GOOS might be better here, but i haven't checked how much work it is.

if you think we should not compile and better to merge this pr, please add a comment in here
kubernetes/kubeadm#1393

@neolit123
Copy link
Member

/lgtm
/hold
(please cancel the hold if ready to merge as is)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 26, 2022
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 26, 2022
@pacoxu
Copy link
Member Author

pacoxu commented Sep 27, 2022

one problem if we don't compile the tests is that if we eventually add windows cp support we will forget about these tests. using GOOS might be better here, but i haven't checked how much work it is.

It can be easily reflected in code coverage with Windows easily like https://testgrid.k8s.io/sig-testing-canaries#ci-kubernetes-coverage-unit later if we support windows cp.

/hold cancel
/retest

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 27, 2022
@k8s-ci-robot k8s-ci-robot merged commit 27b7d3c into kubernetes:master Sep 27, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Sep 27, 2022
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. area/kubeadm 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. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants