refactor: move endpoint- and source-utils out of shared package#5808
refactor: move endpoint- and source-utils out of shared package#5808bachorp wants to merge 1 commit intokubernetes-sigs:masterfrom
Conversation
…from endpoint package
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @bachorp. Thanks for your PR. I'm waiting for a kubernetes-sigs 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. DetailsInstructions 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-sigs/prow repository. |
|
/ok-to-test |
|
Currently, there are no circular imports in the project, so it’s not entirely clear what problem this refactor is trying to solve. I do agree that some of the refactorings or improvements may be hard and introduce some level of coupling and circular dependencies, but in most cases this is due not to respect components boundaries. One of the original reasons for introducing testutils was to isolate test-related utilities from the actual production interfaces (e.g., endpoint and source). With this PR, we now end up mixing test utilities and real interfaces in the same package, which I don’t see as an improvement. ##Concerns Mixing concerns Risk of circular dependencies I think alternative structure need to be proposed Example; If the goal is to group test-related utilities closer to their domain, here are two clean approaches: Option 1: Use domain-specific test packages Option 2: Centralize under internal/testutils Regardless, of an end solution, here are the requirements from my point of view
|
|
@ivankatliarchuk You're right. For some reason I thought this would be required to implement the unit test for #5788 as suggested. |
What does it do ?
Moves
endpoint- andsource-related test utils out oftestutilsinto the respective package.Motivation
To allow utils to be used from
endpointandsourcepackages (otherwise there would be a circular import).More