Commit 6c5b392
authored
Fix load test error detection and add Vertex AI initialization (#493)
* fix: Improve load test error detection and initialize Vertex AI
- Add error detection for HTTP 4xx/5xx responses in SSE streams
- Initialize Vertex AI client with project ID for Agent Engine deployments
- Add logging configuration to track error responses during load tests
## Problem
Load tests were not detecting errors returned within SSE response streams,
causing false positives when the server returned error codes in the JSON
payload. Additionally, Vertex AI client was not properly initialized,
causing potential failures in Agent Engine deployments.
## Solution
- Parse JSON payloads in SSE streams to detect error codes >= 400
- Mark requests as failures and log error details when errors are detected
- Initialize vertexai with project ID and location before creating agent engine
- Add logging configuration to capture error details during load testing
* fix: Correct import order for nest_asyncio in a2a agents
Ruff requires imports to be alphabetically sorted. Move nest_asyncio import
before vertexai import to satisfy linting requirements for adk_a2a agents.1 parent ac30ab8 commit 6c5b392
File tree
3 files changed
+79
-17
lines changed- agent_starter_pack/deployment_targets
- agent_engine
- tests/load_test
- {{cookiecutter.agent_directory}}
- cloud_run/tests/load_test
3 files changed
+79
-17
lines changedLines changed: 34 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
| |||
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
382 | 404 | | |
383 | 405 | | |
384 | | - | |
385 | | - | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
386 | 411 | | |
387 | | - | |
| 412 | + | |
388 | 413 | | |
389 | | - | |
| 414 | + | |
390 | 415 | | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
396 | 421 | | |
397 | 422 | | |
398 | 423 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
167 | 169 | | |
| |||
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
| 198 | + | |
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
| |||
302 | 305 | | |
303 | 306 | | |
304 | 307 | | |
| 308 | + | |
305 | 309 | | |
306 | 310 | | |
Lines changed: 41 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
175 | 183 | | |
176 | 184 | | |
177 | 185 | | |
| |||
267 | 275 | | |
268 | 276 | | |
269 | 277 | | |
| 278 | + | |
270 | 279 | | |
271 | 280 | | |
272 | 281 | | |
| |||
281 | 290 | | |
282 | 291 | | |
283 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
284 | 314 | | |
285 | 315 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
294 | 327 | | |
295 | 328 | | |
296 | 329 | | |
0 commit comments