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

Fix non-test code relying on test-code #119542

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Jul 24, 2023

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Fixes issues with package listing of non-test code using ./... in kubernetes that results in the following errors:

govulncheck ./...
Using go1.20.6 and govulncheck@v1.0.0 with vulnerability data from https://vuln.go.dev (last modified 2023-07-13 22:19:53 +0000 UTC).

govulncheck: loading packages: 
There are errors with the provided package patterns:

/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/create.go:85:11: undefined: operationCode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/create.go:33:9: undefined: operationCode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:37:9: undefined: operationCode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:143:9: undefined: operationCode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/create.go:61:43: undefined: workload
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/create.go:61:54: undefined: realOp
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:48:7: undefined: realOp
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:49:7: undefined: runnableOp
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:70:50: undefined: workload
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:70:61: undefined: realOp
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:121:45: undefined: operationCode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:131:53: undefined: operationCode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:154:7: undefined: realOp
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:155:7: undefined: runnableOp
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:176:50: undefined: workload
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:176:61: undefined: realOp
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/create.go:75:12: undefined: getSpecFromFile
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:52:18: undefined: createResourceClaimsOpcode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:53:66: undefined: createResourceClaimsOpcode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:55:6: undefined: isValidCount
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:89:12: undefined: getSpecFromFile
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:121:68: undefined: createResourceClassOpcode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:132:9: undefined: createResourceClaimTemplateOpcode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:158:18: undefined: createResourceDriverOpcode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:159:66: undefined: createResourceDriverOpcode
/Users/liggitt/go/src/k8s.io/kubernetes/test/integration/scheduler_perf/dra.go:161:6: undefined: isValidCount

Does this PR introduce a user-facing change?

NONE

/cc @pohly @dims

@k8s-ci-robot k8s-ci-robot requested a review from dims July 24, 2023 15:39
@k8s-ci-robot k8s-ci-robot added the release-note-none Denotes a PR that doesn't merit a release note. label Jul 24, 2023
@k8s-ci-robot k8s-ci-robot requested a review from pohly July 24, 2023 15:39
@k8s-ci-robot k8s-ci-robot added 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. 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. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 24, 2023
@k8s-ci-robot
Copy link
Contributor

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-priority Indicates a PR lacks a `priority/foo` label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 24, 2023
@liggitt
Copy link
Member Author

liggitt commented Jul 24, 2023

/retest

@dims
Copy link
Member

dims commented Jul 24, 2023

/approve
/lgtm
/milestone v1.28

NOTE: this is still a test-only change and there is no logic change as well (just renaming the files) and hence should be safe.

@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone Jul 24, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 24, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 01f22e4677b2c2e0c8c87e4a50b40e4cc5a23299

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, liggitt

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 merged commit 6e879bb into kubernetes:master Jul 24, 2023
13 checks passed
@liggitt liggitt deleted the test-import branch July 31, 2023 14:21
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/test 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. 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/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants