You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: fix teardown catching pytest.fail() BaseException
In pytest 4.x, pytest.fail() raises Failed(OutcomeException(BaseException)),
not a subclass of Exception. The except Exception clauses in the CSC fixture
teardown and the ClusterConfig teardown did not catch it, causing teardown
errors to propagate as ERROR even when handled gracefully.
Switch to except BaseException to properly catch all pytest outcome
exceptions in teardown contexts.
operator,tests: fix ClusterConfig recreation after deletion
Replace the panic() in the ClusterConfig reconciler with graceful
in-place recreation. The previous approach relied on Kubernetes
restarting the operator pod (CrashLoopBackOff), which could take
300-600s with controller-runtime v0.21 due to slower leader election
startup — causing test_delete_main_clusterconfig to time out in CI.
Two complementary mechanisms now ensure the main CC is always recreated:
- Reconcile loop: recreates it immediately (~8s) when the deletion
event is caught, with no pod restart.
- ensureMainCC Runnable: runs after leader election to handle the race
window where the deletion event is missed before the watch is
established.
Also add a "freshly restarted" Given step to the operator deletion
scenario: forces a rolling restart before deleting the CC to reset
any accumulated CrashLoopBackOff backoff, making the test robust even
if the operator were to panic for other reasons.
0 commit comments