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

Enable verify-import-boss check for e2e framework #87264

Closed
oomichi opened this issue Jan 15, 2020 · 1 comment · Fixed by #87265
Closed

Enable verify-import-boss check for e2e framework #87264

oomichi opened this issue Jan 15, 2020 · 1 comment · Fixed by #87265
Labels
area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework kind/bug Categorizes issue or PR as related to a bug. sig/testing Categorizes an issue or PR as relevant to SIG Testing.

Comments

@oomichi
Copy link
Member

oomichi commented Jan 15, 2020

What happened:

There is test/e2e/framework/.import-restrictions to manage import ways under test/e2e/framework/ but that doesn't work at our upstream CI.
We can enable it by #81246 (comment)
But if doing that, we will face the following error with ./hack/verify-import-boss.sh

E0115 22:24:36.649546    8112 main.go:93] Error: Failed executing generator: some packages had errors:
errors in package "k8s.io/kubernetes/test/e2e/framework/security":
the following imports did not match any allowed prefix:
  k8s.io/kubernetes/pkg/scheduler/algorithm/predicates
  k8s.io/kubernetes/pkg/scheduler/framework/plugins/helper
  k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeaffinity
  k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodename
  k8s.io/kubernetes/pkg/scheduler/framework/plugins/nodeports
  k8s.io/kubernetes/pkg/scheduler/framework/plugins/noderesources
  k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1
  k8s.io/kubernetes/pkg/scheduler/listers
  k8s.io/kubernetes/test/e2e/framework
  k8s.io/kubernetes/test/e2e/framework/kubectl
  k8s.io/kubernetes/test/e2e/system
  k8s.io/utils/io
  k8s.io/utils/mount

...

!!! Error in ./hack/verify-import-boss.sh:28
  Error in ./hack/verify-import-boss.sh:28. '$(kube::util::find-binary "import-boss") --verify-only "$@"' exited with status 1
Call stack:
  1: ./hack/verify-import-boss.sh:28 main(...)
Exiting with status 1

What you expected to happen:

I hope the check is always running to block invalid import ways at upstream CI system.

How to reproduce it (as minimally and precisely as possible):

As #81246 (comment)

  1. Add line "k8s.io/kubernetes/test/e2e/framework/...", into arguments.InputDirs of staging/src/k8s.io/code-generator/cmd/import-boss/main.go
  2. Run ./hack/verify-import-boss.sh
@oomichi oomichi added the kind/bug Categorizes issue or PR as related to a bug. label Jan 15, 2020
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Jan 15, 2020
@oomichi
Copy link
Member Author

oomichi commented Jan 15, 2020

/sig testing
/area e2e-test-framework

@k8s-ci-robot k8s-ci-robot added sig/testing Categorizes an issue or PR as relevant to SIG Testing. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework kind/bug Categorizes issue or PR as related to a bug. sig/testing Categorizes an issue or PR as relevant to SIG Testing.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants