-
Notifications
You must be signed in to change notification settings - Fork 38.6k
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
e2e: restructure e2e framework and its sub-packages to solve potential cycle imports #109224
Conversation
@kidlj: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
Hi @kidlj. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
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. |
…ependencies-version.sh
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kidlj The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
pull-kubernetes-verify
/retest |
@kidlj: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
I haven't looked at the changes in this PR, but did want to note an issue that a previous e2e framework refactor caused - #103697 Ginkgo is tricky enough to reason about that it's not always clear what side effects a refactor might have. Reviews of this PR should consider whether any of the changes could trigger something like #103697 |
There was a PR that I worked on that stalled #100304 with a doc https://docs.google.com/document/d/12QckcyZpBzmgdQZ91h21co4J0rtoXIH76QJBgR1nD6Y/edit#heading=h.xmmbjkrz1oj9, I'd suggest writing one to have a better picture of the proposed change. I'd also suggest to split the changes in multiple PRs for the reviewers, it's going to be hard keeping track of changes in +400 files. |
@mauriciopoppe Sure, thanks for the kind suggestion. This PR serves as a POC for the refactoring to pass all tests, so if it can be accepted, I would like to divide it into several sub-PRs, and with some documentations. |
I'm -1 until we have a clear analysis of pros and cons, I personally had to spend a lot of time chasing flakes and bugs because of unexpected dependencies on test that broke on the previous refactor |
@kidlj: PR needs rebase. 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. |
/remove-sig api-machinery |
I understand. But the circular imports issue from e2e core framework and its sub-package has been stuck for a long time, making writing tests kind of hard; and I don't see another way fixing it without refactoring. So how about we do it little by little, aspect by aspect, with detailed documentation and sub-PRs to fix this issue? If OK, I'd like to open a meta issue to manage the process. Thanks. |
/remove-sig instrumentation |
yeah, I meant something like that, step by step and some place tracking the job done and remaining 😄 |
This PR is way too large to review, and I opened an umbrella issue to track the process of this refactoring and hoped to do it little by little, if triage accepted. So please discuss it there and this PR will be closed. /close |
@kidlj: Closed this PR. In response to this:
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. |
What type of PR is this?
/kind cleanup
/kind api-change
What this PR does / why we need it:
Currently, many e2e functionalities are divided into sub packages from framework itself. The framework as a hub to its sub-packages must import some or all of these sub-packages to provide functionalitiies to test cases, however, some framework sub-packages import framework package back, notably to use framework.TestContext, its log and exec utils, framework.Namespace.Name etc, which may cause many potential circular imports to happen. See #81245
This PR did one thing: to avoid e2e framework sub-packages from importing framework package. To achieve this goal, this PR made these changes:
f.ClientSet
andf.Namespace.Name
).FrameworkBeforeEach(f *Framework)
andFrameworkAfterEach(f *Framework)
fromProviderInterface
interface, since none of them is ever used.Which issue(s) this PR fixes:
Fixes #81245
Special notes for your reviewer:
Since it's huge, this PR serves as a POC of this refactoring to pass all tests; If it can be accepted, I would like to separate this PR into several sub-PRs for ease to review, and some more cleanup will be done later.
/cc @oomichi , @BenTheElder
Does this PR introduce a user-facing change?
But projects that import e2e framework or its sub-packages may face API changes.
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: