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

Make package paths referenced by import boss valid #105330

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Sep 28, 2021

What type of PR is this?

/kind bug

What this PR does / why we need it:

verify-import-boss.sh references package paths of the form k8s.io/api/..., but many of the staging repos roots are not valid go packages.

This adds doc.go files to make them valid packages so that go package resolution works properly in gopath and go module mode.

Hoisted out of #99226. Prereq to #105299

Which issue(s) this PR fixes:

xref #82531

NONE

/area code-organization
/cc @dims

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/code-organization Issues or PRs related to kubernetes code organization do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. 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. 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/apiserver area/cloudprovider area/code-generation area/kubectl kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. and removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 28, 2021
@fedebongio
Copy link
Contributor

/remove-sig api-machinery

@k8s-ci-robot k8s-ci-robot removed the sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. label Sep 28, 2021
@dims
Copy link
Member

dims commented Sep 28, 2021

/retest
/approve

@dims
Copy link
Member

dims commented Sep 28, 2021

i can't see what's wrong with verify deps job @liggitt

+++ command: bash "hack/make-rules/../../hack/verify-vendor.sh"
+++ [0928 20:38:50] logfile at /tmp/update-vendor.cnWI/update-vendor.log
+++ [0928 20:38:50] go.mod: update staging references
+++ [0928 20:39:13] go.mod: propagate to staging modules
+++ [0928 20:39:14] go.mod: sorting staging modules
Removing /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.8sbGiA
+++ exit code: 1
+++ error: 1
�[0;31mFAILED�[0m   verify-vendor.sh	32s
========================
�[0;31mFAILED TESTS�[0m
========================
�[0;31mhack/make-rules/../../hack/verify-vendor.sh�[0m
make: *** [Makefile:128: verify] Error 1
+ EXIT_VALUE=2
+ set +o xtrace
Cleaning up after docker in docker.

@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@liggitt
Copy link
Member Author

liggitt commented Sep 28, 2021

conflict in package declaration between a tools.go file already in k8s.io/code-generator:

=== computing tools imports for k8s.io/apiextensions-apiserver
go: found k8s.io/code-generator in k8s.io/code-generator v0.0.0-00010101000000-000000000000
examples/client-go/hack/tools.go:23:8: found packages codegenerator (doc.go) and tools (tools.go) in /Users/liggitt/go/src/k8s.io/kubernetes/staging/src/k8s.io/code-generator

fixed in latest push

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Sep 28, 2021
@ehashman ehashman added this to Triage in SIG Node PR Triage Sep 29, 2021
@dims
Copy link
Member

dims commented Sep 29, 2021

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 29, 2021
@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 d551560 into kubernetes:master Sep 29, 2021
@k8s-ci-robot k8s-ci-robot added this to the v1.23 milestone Sep 29, 2021
@liggitt liggitt deleted the importboss-doc branch September 30, 2021 04:45
@jpbetz
Copy link
Contributor

jpbetz commented Sep 30, 2021

/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 Sep 30, 2021
@eddiezane
Copy link
Member

This PR seems to have broken the (probably incorrect) way I've been running tests.

make test WHAT=./staging/src/k8s.io/kubectl/...
+++ [1026 18:01:05] Running tests without code coverage and with -race
code in directory /home/eddiezane/Codez/kubernetes/kubernetes/_output/local/go/src/k8s.io/kubernetes/staging/src/k8s.io/kubectl expects import "k8s.io/kubectl"
make: *** [Makefile:184: test] Error 1

Anyone coming here from git bisect should use the sub pkg directory.

make test WHAT=./staging/src/k8s.io/kubectl/pkg/...
+++ [1026 18:01:39] Running tests without code coverage and with -race
?       k8s.io/kubernetes/staging/src/k8s.io/kubectl/pkg/apply  [no test files]
ok      k8s.io/kubernetes/staging/src/k8s.io/kubectl/pkg/apply/parse    0.040s

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/apiserver area/cloudprovider area/code-generation area/code-organization Issues or PRs related to kubernetes code organization area/kubectl cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. 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. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/node Categorizes an issue or PR as relevant to SIG Node. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

7 participants