Commit 39dc3c5
Fix race condition in e2e compliance test setup
Problem: The install_e2e_compliance_resources() function was creating a
TailoredProfile immediately after creating the CustomRule it references,
without waiting for the CustomRule to be processed by the compliance operator.
This caused a race condition where the TailoredProfile could fail to reach
READY state if the CustomRule wasn't validated yet.
Solution: Add a wait loop after creating the CustomRule to ensure it exists
and give the compliance operator time to process it (10 seconds) before
creating the TailoredProfile. Also improved error reporting to show the
TailoredProfile's error message and current state during the wait loop.
The e2e-tailored-profile.yaml references check-cm-marker CustomRule in its
enableRules, so the CustomRule must be ready before the TailoredProfile can
be validated successfully.
Fixes: #19880 CI failure in ocp-4-21-compliance-e2e-tests
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 5dd8504 commit 39dc3c5
1 file changed
+22
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
566 | 579 | | |
567 | | - | |
| 580 | + | |
| 581 | + | |
568 | 582 | | |
569 | 583 | | |
570 | 584 | | |
| |||
573 | 587 | | |
574 | 588 | | |
575 | 589 | | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
576 | 596 | | |
577 | 597 | | |
578 | | - | |
| 598 | + | |
579 | 599 | | |
580 | 600 | | |
581 | 601 | | |
| |||
0 commit comments