Skip to content

Move the connectivity package from cilium-cli#31077

Closed
michi-covalent wants to merge 3 commits intomainfrom
pr/michi/majestic-ketchup
Closed

Move the connectivity package from cilium-cli#31077
michi-covalent wants to merge 3 commits intomainfrom
pr/michi/majestic-ketchup

Conversation

@michi-covalent
Copy link
Copy Markdown
Contributor

@michi-covalent michi-covalent commented Mar 1, 2024

3 commits:

  • move the connectivity package from cilium-cli.
  • configure workflows to use the local connectivity package.
  • run cilium connectivity test against the latest released version of cilium when there is a change in pkg/cilium-cli.

CFP: cilium/design-cfps#9

Test cilium-cli against a stable Cilium release workflow is passing ✅ https://github.com/cilium/cilium/actions/runs/8563015042/job/23467355624?pr=31077

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 1, 2024
@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent michi-covalent added the release-note/minor This PR changes functionality that users may find relevant to operating Cilium. label Mar 1, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Mar 1, 2024
@michi-covalent michi-covalent force-pushed the pr/michi/majestic-ketchup branch 6 times, most recently from 50ff439 to 9a8c261 Compare March 1, 2024 03:04
@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent michi-covalent force-pushed the pr/michi/majestic-ketchup branch 7 times, most recently from a97ccb8 to 0c1e088 Compare March 2, 2024 04:56
@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

1 similar comment
@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

7 similar comments
@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

1 similar comment
@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

Copy link
Copy Markdown
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!

@michi-covalent
Copy link
Copy Markdown
Contributor Author

Test cilium-cli against a stable Cilium release workflow is passing ✅ https://github.com/cilium/cilium/actions/runs/8531056772?pr=31077

removing the temporary commit and marking it ready for review

@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

Copy link
Copy Markdown

@ghost ghost left a comment

Choose a reason for hiding this comment

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

amazing docs good

Move the connectivity package from cilium/cilium-cli repo. The main goal
here is to make "cilium connectivity test" use the local package so that
you can develop new features and add tests for the new feature without
having to deal with multiple repositories. There is a corresponding pull
request in the cilium-cli repo [^1] to import the connectivity package
from the cilium repo. See CFP-25694 [^2] for additional details.

The following files are direct copies from [email protected] with some
minor adjustments like renaming package paths and fixing lint errors:

- cilium-cli/cli/connectivity.go [^3]
- cilium-cli/connectivity/* [^4]
- cilium-cli/cmd/cilium/main.go [^5]

[^1]: cilium/cilium-cli#2355
[^2]: cilium/design-cfps#9
[^3]: https://github.com/cilium/cilium-cli/blob/v0.16.4/cli/connectivity.go
[^4]: https://github.com/cilium/cilium-cli/tree/v0.16.4/connectivity
[^5]: https://github.com/cilium/cilium-cli/blob/v0.16.4/cmd/cilium/main.go

Signed-off-by: Michi Mutsuzaki <[email protected]>
Configure all the workflows that depends on cilium-cli to use the local
version in /cilium-cli directory so that they use the local connectivity
package for testing.

Signed-off-by: Michi Mutsuzaki <[email protected]>
The purpose of this workflow is to ensure that the connectivity test
continues to work against a released version of cilium when there is a
change in cilium-cli/ directory.

This workflow is based on kind.yaml in cilium-cli repo [^1].

[^1]: https://github.com/cilium/cilium-cli/blob/main/.github/workflows/kind.yaml

Signed-off-by: Michi Mutsuzaki <[email protected]>
@michi-covalent
Copy link
Copy Markdown
Contributor Author

/test

Copy link
Copy Markdown
Member

@brb brb left a comment

Choose a reason for hiding this comment

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

Thanks!

@michi-covalent
Copy link
Copy Markdown
Contributor Author

still need review from @cilium/sig-scalability and @cilium/github-sec 🚀🙏 (it's already approved by build and contributing teams since tobias is a member).

apologies the pull request appears very large, but these files are simply copied from cilium-cli repo so you don't need to review the actual test logic:

Copy link
Copy Markdown
Member

@aanm aanm left a comment

Choose a reason for hiding this comment

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

I have some concerns with the way that the code is currenctly structured.

For example,
cilium-cli/cmd/cilium/main.go imports "github.com/cilium/cilium-cli/api".

This dependency, stored in "vendor/", imports "github.com/cilium/cilium/cilium-cli/connectivity".

We are kind of doing a import cycle across repositories 😕

Isn't there a cleaner option? I thought we were planning to use the "normal" cilium-cli and use cilium/cilium connectivity tests as "plugins" or "extensions" on top of cilium-cli.

Also, how do we make sure that the changes introduced in cilium/cilium connectivity tests don't break cilium/cilium-cli CI?

@michi-covalent
Copy link
Copy Markdown
Contributor Author

Isn't there a cleaner option? I thought we were planning to use the "normal" cilium-cli and use cilium/cilium connectivity tests as "plugins" or "extensions" on top of cilium-cli.

yeah we've been experimenting using the hooks to extend the connectivity package for a while (cc @jibi / @brb). i think in practice it didn't really solve the pain points developers are facing. it's been difficult to define the hook api ahead of time since different tests need to modify different aspects of the connectivity package. so often times you end up having to modify cilium-cli hook api anyways before you can write tests in cilium/cilium repo.

Also, how do we make sure that the changes introduced in cilium/cilium connectivity tests don't break cilium/cilium-cli CI?

we run cilium connectivity test against a stable release with this workflow => https://github.com/cilium/cilium/pull/31077/files#diff-946ad5f53d9eb272c72747253dc2edef9bcdb5c5d13bc03a7ee20ac343eb8aaa

@brb
Copy link
Copy Markdown
Member

brb commented Apr 6, 2024

yeah we've been experimenting using the hooks to extend the connectivity package for a while (cc @jibi / @brb). i think in practice it didn't really solve the pain points developers are facing

Yep, as one who spent a significant amount of time developing the CLI tests last year I can confirm that the hooks didn't resolve the issues.

@michi-covalent
Copy link
Copy Markdown
Contributor Author

back to the drawing board. converting to draft.

@github-actions
Copy link
Copy Markdown

This pull request has been automatically marked as stale because it
has not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 3, 2024

This pull request has not seen any activity since it was marked stale.
Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/ci This PR makes changes to the CI. stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants