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

Connectivity test factory component. #2322

Merged
merged 1 commit into from
Mar 5, 2024
Merged

Conversation

viktor-kurchenko
Copy link
Contributor

@viktor-kurchenko viktor-kurchenko commented Feb 21, 2024

Introducing connectivity tests factory component.

The PR goals are:

  1. Extract connectivity test definitions in separate files.
  2. Implement a factory component that is responsible for keeping test creation logic and order.
  3. The first refactoring step related to the CFP: CFP: Cilium CLI connectivity tests speedup. design-cfps#15

Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add entries to CODEOWNERS for the newly created files in connectivity/facrtory where applicable? Where the owner is not obvious, keeping @cilium/ci-structure is probably fine for now, but some tests are quite feature-specific so the relevant team should probably be in the loop for any future changes.

@tklauser tklauser added the needs-rebase This PR needs to be rebased because it has merge conflicts. label Feb 23, 2024
@viktor-kurchenko viktor-kurchenko force-pushed the pr/vk/connectivity/test/factory branch from f534f32 to a5ace62 Compare February 23, 2024 14:47
@viktor-kurchenko viktor-kurchenko requested a review from a team as a code owner February 23, 2024 14:47
@viktor-kurchenko
Copy link
Contributor Author

Could you please add entries to CODEOWNERS for the newly created files in connectivity/facrtory where applicable? Where the owner is not obvious, keeping @cilium/ci-structure is probably fine for now, but some tests are quite feature-specific so the relevant team should probably be in the loop for any future changes.

Done, thanks!

CODEOWNERS Outdated Show resolved Hide resolved
@viktor-kurchenko viktor-kurchenko force-pushed the pr/vk/connectivity/test/factory branch from a5ace62 to 0b46aa4 Compare February 23, 2024 17:03
@tklauser tklauser removed the needs-rebase This PR needs to be rebased because it has merge conflicts. label Feb 23, 2024
@viktor-kurchenko viktor-kurchenko force-pushed the pr/vk/connectivity/test/factory branch from 0b46aa4 to f5402d6 Compare February 25, 2024 12:52
@michi-covalent
Copy link
Contributor

i'll review this today

Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 for splitting tests into separate files 🥰

at a very high level we need to think about how to express the order of tests. it will be difficult to maintain if we have a single primaryTests. we also need to think about tests being added from outside using the hook interface.

... stepping back even further, it doesn't have to be fixed in this PR but why does the order matter?

CODEOWNERS Outdated Show resolved Hide resolved
connectivity/check/test.go Show resolved Hide resolved
connectivity/factory/factory.go Outdated Show resolved Hide resolved
connectivity/factory/factory.go Outdated Show resolved Hide resolved
connectivity/factory/factory.go Outdated Show resolved Hide resolved
connectivity/factory/factory.go Outdated Show resolved Hide resolved
connectivity/factory/factory.go Outdated Show resolved Hide resolved
Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks viktor it looks much better now. i have a couple of minor nits but i'm approving it now. feel free to merge it once these nits get addressed 🚀🙏

CODEOWNERS Outdated Show resolved Hide resolved
connectivity/check/test.go Show resolved Hide resolved
connectivity/check/test.go Outdated Show resolved Hide resolved
connectivity/check/test.go Show resolved Hide resolved
connectivity/factory/factory.go Outdated Show resolved Hide resolved
@viktor-kurchenko viktor-kurchenko removed the request for review from brlbil March 5, 2024 06:48
@viktor-kurchenko viktor-kurchenko force-pushed the pr/vk/connectivity/test/factory branch from 3d92508 to 620e130 Compare March 5, 2024 07:13
Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes LGTM.

Some suggestions for CODEOWNERS inline. Please also squash your commits into a single one.

CODEOWNERS Outdated
Comment on lines 46 to 47
/connectivity/builder/egress_gateway.go @cilium/sig-clustermesh
/connectivity/builder/egress_gateway_excluded_cidrs.go @cilium/sig-clustermesh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should probably be owned by @cilium/egress-gateway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks!

CODEOWNERS Outdated
Comment on lines 48 to 50
/connectivity/builder/health.go @cilium/sig-clustermesh
/connectivity/builder/host_entity_egress.go @cilium/sig-clustermesh
/connectivity/builder/host_entity_ingress.go @cilium/sig-clustermesh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why these are assigned to @cilium/sig-clustermesh. The features they're testing don't seem related. Probably best to drop these entries and let @cilium/ci-structure take care of them for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just deleted them because @cilium/ci-structure is the default for the package.

CODEOWNERS Outdated
Comment on lines 38 to 45
/connectivity/builder/echo_ingress.go @cilium/sig-clustermesh
/connectivity/builder/echo_ingress_auth_always_fail.go @cilium/sig-clustermesh
/connectivity/builder/echo_ingress_from_other_client_deny.go @cilium/sig-clustermesh
/connectivity/builder/echo_ingress_from_outside.go @cilium/sig-clustermesh
/connectivity/builder/echo_ingress_knp.go @cilium/sig-clustermesh
/connectivity/builder/echo_ingress_l7.go @cilium/sig-clustermesh
/connectivity/builder/echo_ingress_l7_named_port.go @cilium/sig-clustermesh
/connectivity/builder/echo_ingress_mutual_auth_spiffe.go @cilium/sig-encryption
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the features these are testing, I think they should be assigned to @cilium/sig-servicemesh instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@viktor-kurchenko
Copy link
Contributor Author

Some suggestions for CODEOWNERS inline. Please also squash your commits into a single one.

Commits squashed, thank you!

Copy link
Member

@tklauser tklauser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Viktor!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Mar 5, 2024
@tklauser tklauser merged commit 486eb99 into main Mar 5, 2024
13 checks passed
@tklauser tklauser deleted the pr/vk/connectivity/test/factory branch March 5, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants