-
Notifications
You must be signed in to change notification settings - Fork 723
[Test] Add load tests and behavioral checks to incremental upgrade E2E #4541
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
base: master
Are you sure you want to change the base?
Changes from 43 commits
44c4aef
01bd86e
40f1d5c
bb4a26f
afc9dcc
89f5478
004a757
f00ab71
ef802a6
87ca63d
1b8ab65
504ecf5
e64a6e7
25f34ee
6b23507
0aa45a1
dc98432
7e4d888
8f6df3d
f71836a
b1eeab8
7c2e504
62fa293
d152779
b9db8ee
442db2d
2e7042e
6ae50b8
9737c31
c57f594
f183c38
bf164e9
9becace
b485e1e
38bce3f
6acc27a
fe092d0
067ba1f
d0025dc
5eef493
675d3ef
4c38b7e
7e821f3
13011d6
73e6637
baf2d6c
44fdb7e
d1591b9
ffd38b6
9f745c3
fdf988f
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,121 @@ | ||
| package e2eincrementalupgrade | ||
|
|
||
| import "k8s.io/utils/ptr" | ||
|
|
||
| // These parameters control capacity scaling and gradual traffic migration during the upgrade. | ||
| type incrementalUpgradeParams struct { | ||
| Name string | ||
| StepSize int32 | ||
| Interval int32 | ||
| MaxSurge int32 | ||
| } | ||
|
|
||
| // incrementalUpgradeCombinations defines diverse (stepSize, interval, maxSurge) combinations | ||
| // to exercise different upgrade behaviors. Each combination targets a distinct scenario. | ||
| var incrementalUpgradeCombinations = []incrementalUpgradeParams{ | ||
| { | ||
| // Scenario: Instant cutover. | ||
| // All capacity and traffic shift in one step, which behaves like a blue/green deployment. | ||
| StepSize: 100, | ||
| Interval: 1, | ||
| MaxSurge: 100, | ||
| Name: "BlueGreen", | ||
| }, | ||
| { | ||
| // Scenario: Aggressive gradual upgrade. | ||
| // Larger traffic migration steps with shorter intervals. | ||
| StepSize: 25, | ||
| Interval: 5, | ||
| MaxSurge: 50, | ||
| Name: "AggressiveGradual", | ||
| }, | ||
| { | ||
| // Scenario: Conservative gradual upgrade. | ||
| // Smaller traffic migration steps with longer intervals. | ||
| StepSize: 5, | ||
| Interval: 10, | ||
| MaxSurge: 25, | ||
| Name: "ConservativeGradual", | ||
| }, | ||
| } | ||
|
|
||
| // ptrs returns (*stepSize, *interval, *maxSurge) for use with the RayService bootstrap helper. | ||
| func (p incrementalUpgradeParams) ptrs() (*int32, *int32, *int32) { | ||
| return ptr.To(p.StepSize), ptr.To(p.Interval), ptr.To(p.MaxSurge) | ||
| } | ||
|
|
||
| // The following defines the Serve configurations for different types of incremental upgrade tests, including: | ||
| // - Functional test | ||
| // - High-RPS Locust load test | ||
| // | ||
| // NOTE: working_dir is coupled with the external GitHub repos, which might lead to CI flakiness considering the | ||
| // availability and stability of these repos and specific commit hashes. | ||
|
|
||
| type serveConfigV2 string | ||
|
|
||
| // defaultIncrementalUpgradeServeConfigV2 configures a Serve app for functional tests. | ||
| const defaultIncrementalUpgradeServeConfigV2 serveConfigV2 = `applications: | ||
| - name: fruit_app | ||
| import_path: fruit.deployment_graph | ||
| route_prefix: /fruit | ||
| runtime_env: | ||
| working_dir: "https://github.com/ray-project/test_dag/archive/78b4a5da38796123d9f9ffff59bab2792a043e95.zip" | ||
| deployments: | ||
| - name: MangoStand | ||
| num_replicas: 1 | ||
| user_config: | ||
| price: 3 | ||
| ray_actor_options: | ||
| num_cpus: 0.1 | ||
| - name: OrangeStand | ||
| num_replicas: 1 | ||
| user_config: | ||
| price: 2 | ||
| ray_actor_options: | ||
| num_cpus: 0.1 | ||
| - name: FruitMarket | ||
| num_replicas: 1 | ||
| ray_actor_options: | ||
| num_cpus: 0.1 | ||
| - name: math_app | ||
| import_path: conditional_dag.serve_dag | ||
| route_prefix: /calc | ||
| runtime_env: | ||
| working_dir: "https://github.com/ray-project/test_dag/archive/78b4a5da38796123d9f9ffff59bab2792a043e95.zip" | ||
| deployments: | ||
| - name: Adder | ||
| num_replicas: 1 | ||
| user_config: | ||
| increment: 3 | ||
| ray_actor_options: | ||
| num_cpus: 0.1 | ||
| - name: Multiplier | ||
| num_replicas: 1 | ||
| user_config: | ||
| factor: 5 | ||
| ray_actor_options: | ||
| num_cpus: 0.1 | ||
| - name: Router | ||
| num_replicas: 1 | ||
| ray_actor_options: | ||
| num_cpus: 0.1 | ||
| ` | ||
|
|
||
| // highRPSServeConfigV2 configures a minimal high-RPS Serve app (SimpleDeployment) for Locust load tests. | ||
| const highRPSServeConfigV2 serveConfigV2 = `applications: | ||
| - name: simple_app | ||
| import_path: simple_serve.app | ||
| route_prefix: /test | ||
| runtime_env: | ||
| working_dir: "https://github.com/jiangjiawei1103/incr-upgrade-locust/archive/a185bb29374388e801db4331ae73af3ad1e79a5f.zip" | ||
|
||
| deployments: | ||
| - name: SimpleDeployment | ||
| autoscaling_config: | ||
| min_replicas: 1 | ||
| max_replicas: 3 | ||
| target_ongoing_requests: 2 | ||
| max_ongoing_requests: 6 | ||
| upscale_delay_s: 0.5 | ||
| ray_actor_options: | ||
| num_cpus: 2 | ||
| ` | ||
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.
We increase the timeout to deflake the e2e test.