Commit 9ef5a3e
authored
Merge pull request #905 from cderici/wait-for-idle-consider-app-status
#905
#### Description
This adds logic to `wait_for_idle` to also consider application status when computing status via the unit statuses.
Should fix #831 and #900
#### QA Steps
This adds some scenarios to the existing unit tests for `wait_for_idle`. Also adds a pytest mark "wait_for_idle", so only the tests related to `wait_for_idle` can be run as a subset:
```
tox -e py3 -- -m wait_for_idle
```
```
tox -e integration -- -m wait_for_idle
```
#### Notes & Discussion
* As I wrote a TODO in the comments, `wait_for_idle` is becoming more and more convoluted. Basically we need two versions of this function. 1) `wait_for_applications()` for users who want to wait on an application to be in a certain state and doesn't particularly care about units, and 2) `wait_for_units()` for users who want finer detailed control and want to wait on certain number of units in certain applications to be in certain states etc.
* @DnPlas, @ca-scribner, @beliaev-maksim, I'm gonna ask your help validating this patch. We got a bunch of unit and integration tests that should be covering most of the scenarios related to the `wait_for_idle`, however, I'd greatly appreciate if you guys could also give this PR a good stress test. I'm basically asking you to run all the integration test you have that uses `wait_for_idle` against this patch and see if it can take a punch. Thanks!3 files changed
Lines changed: 106 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2572 | 2572 | | |
2573 | 2573 | | |
2574 | 2574 | | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
2579 | | - | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
2580 | 2593 | | |
2581 | 2594 | | |
2582 | 2595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
785 | 785 | | |
786 | 786 | | |
787 | 787 | | |
| 788 | + | |
788 | 789 | | |
789 | 790 | | |
790 | 791 | | |
791 | 792 | | |
792 | 793 | | |
793 | | - | |
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
| |||
800 | 800 | | |
801 | 801 | | |
802 | 802 | | |
| 803 | + | |
803 | 804 | | |
804 | 805 | | |
805 | 806 | | |
806 | 807 | | |
807 | 808 | | |
808 | | - | |
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| |||
815 | 815 | | |
816 | 816 | | |
817 | 817 | | |
| 818 | + | |
818 | 819 | | |
819 | 820 | | |
820 | 821 | | |
| |||
837 | 838 | | |
838 | 839 | | |
839 | 840 | | |
| 841 | + | |
840 | 842 | | |
841 | 843 | | |
842 | 844 | | |
843 | 845 | | |
844 | 846 | | |
845 | | - | |
846 | 847 | | |
847 | 848 | | |
848 | 849 | | |
| |||
851 | 852 | | |
852 | 853 | | |
853 | 854 | | |
| 855 | + | |
854 | 856 | | |
855 | 857 | | |
856 | 858 | | |
857 | 859 | | |
858 | 860 | | |
859 | | - | |
860 | 861 | | |
861 | 862 | | |
862 | 863 | | |
| |||
865 | 866 | | |
866 | 867 | | |
867 | 868 | | |
| 869 | + | |
868 | 870 | | |
869 | 871 | | |
870 | 872 | | |
| |||
874 | 876 | | |
875 | 877 | | |
876 | 878 | | |
877 | | - | |
| 879 | + | |
878 | 880 | | |
879 | 881 | | |
880 | 882 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| 299 | + | |
299 | 300 | | |
| 301 | + | |
300 | 302 | | |
301 | 303 | | |
302 | 304 | | |
303 | | - | |
| 305 | + | |
304 | 306 | | |
305 | 307 | | |
306 | | - | |
| 308 | + | |
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
| 314 | + | |
| 315 | + | |
318 | 316 | | |
319 | 317 | | |
320 | 318 | | |
| |||
331 | 329 | | |
332 | 330 | | |
333 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
0 commit comments