-
Notifications
You must be signed in to change notification settings - Fork 27
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
CFP: Cilium CLI connectivity tests speedup. #15
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# CFP-1189: Cilium CLI connectivity tests speedup | ||
|
||
**SIG: SIG-USER** | ||
|
||
**Begin Design Discussion:** 2024-01-19 | ||
|
||
**Cilium Release:** 1.15 | ||
|
||
**Authors:** Viktor Kurchenko <[email protected]> | ||
|
||
## Summary | ||
|
||
The CFP describes a new approach to run Cilium connectivity tests. | ||
The idea is to group all the tests in small sets and run them in parallel. | ||
|
||
## Motivation | ||
|
||
Currently, connectivity tests might run in CI for over 1 hour (it depends | ||
on many factors) and the test case count constantly increasing. | ||
To make CI pipelines faster and cheaper we can consider the connectivity | ||
tests parallelization approach. | ||
|
||
## Goals | ||
|
||
* Group connectivity tests into independent sets that can be run concurrently. | ||
* Run each independent test set concurrently (all together or in batches). | ||
* Collect test results and display them periodically. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like a different subject to me and it may make sense to have the CFP focused on test parallelisation. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Maybe but if some tests are run in parallel how it will look from the user's perspective? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure to follow. I have looked at a simple example. The curl test should be free of side effect. The flow validation, I am guessing so and for metrics validation I don't know. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that is what I meant. |
||
|
||
## Proposal | ||
|
||
### Walkthrough | ||
|
||
1. Cilium CLI groups all connectivity tests into independent sets that | ||
do not interfere with each other. A separate component can be implemented | ||
to keep this responsibility (e.g.: `TestSetFactory`). | ||
2. Each produced test set can be run concurrently. In some cases, it might be | ||
not acceptable to run many test sets concurrently (e.g.: due to limited | ||
resources in a cluster). CLI should provide an option | ||
(e.g.: `--test-batch-size`) that allows to group test sets into fixed-size | ||
batches and run batches synchronously. | ||
3. Each test set should provision its namespace and all the required resources. | ||
4. A separate component (e.g.: `TestMonitor`) can be implemented and run in a | ||
dedicated goroutine to collect each test set execution results and display | ||
them periodically. | ||
|
||
### Concurrent output example | ||
|
||
![Conn tests concurrent output](./images/conn-tests-concurrent-output.gif) | ||
|
||
However, this example might not work properly on GitHub actions due to in-place | ||
output updates. In pipelines, CLI can cache and display each test result | ||
sequentially even with a predefined order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grouping in test sets that can be run concurrently may be a difficult exercise:
Possible alternative approaches:
Non destructive tests, which share the same configuration flavour may then be run in parallel on the same cluster. Tests for a code areas, which have not been touched by a PR can be trimmed of the CI run.