← Back to Pull requests

RHOAIENG-85610: Add live operator chaos E2E tests #9798

Closed
unknown closed this pull request without merging on Sep 24, 2026 20:09 UTC
View on GitHub
unknown unknown commented on Sep 16, 2026 15:49 UTC
Author

https://redhat.atlassian.net/browse/RHOAIENG-85610

Description

Ports the dashboard operator-chaos scenarios to the live-cluster E2E framework introduced by #9716.

  • Exercises PodKill, NetworkPartition, and PDBBlock against the deployed dashboard-operator controller.

  • Requires explicit destructive-test opt-in, validates permissions, rejects protected namespaces, and runs scenarios serially.

  • Proves each injected fault occurred before checking recovery and Dashboard operand health.

  • Adds API-server-aware readiness so a controller partition is observable without changing its local liveness behavior.

  • Retargets the existing operator-chaos experiment definitions from the dashboard operand to the controller and adds a selective Make target and usage documentation.

  • Registers cleanup immediately and verifies injected NetworkPolicies and PDBs are removed.
  • How Has This Been Tested?

    Automated validation:

  • make test

  • make lint (0 issues, including integration and E2E build tags)

  • make build

  • make build-e2e

  • E2E-tagged test binary compilation

  • make chaos-validate (knowledge model and all three experiments valid)

  • git diff --check
  • Manual live-cluster validation:

  • Built the branch with the OpenShift binary build service and deployed immutable image digest sha256:a63aa955e269145f71290d28828ab7e3369b7e05272770808a9e64abba6045df to dashboard-operator in redhat-ods-applications.

  • Ran make test-e2e-chaos against the authenticated OpenShift cluster with TEST_ENABLE_CHAOS=true.

  • PodKill: PASS in 16.05s; verified replacement with a distinct pod UID.

  • NetworkPartition: PASS in 51.66s; verified controller readiness loss, unreconciled drift during isolation, informer recovery, and drift repair after cleanup.

  • PDBBlock: PASS in 2.39s; verified a real policy/v1 eviction was rejected with HTTP 429 while the injected PDB was active.

  • Full suite: PASS in 119.366s.

  • Restored the original Dashboard CR. Final state was Ready=True, Degraded=False, all operands ready, and no operator-chaos NetworkPolicies or PDBs remaining. The temporary BuildConfig was deleted.
  • Test Impact

    Adds an opt-in destructive live-cluster suite selected through make test-e2e-chaos. The ordinary E2E target continues to skip these scenarios unless TEST_ENABLE_CHAOS=true is set. Unit coverage is included for readiness, selector configuration, injection-event evidence, and eviction classification.

    Request review criteria:

    Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work

  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).

  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)

  • The code follows our Best Practices (React coding standards, PatternFly usage, performance considerations)
  • If you have UI changes:

  • Not applicable; this PR has no UI changes.
  • After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Tests
    Added end-to-end chaos scenarios covering operator pod recovery, network partition handling, and disruption-budget blocking.
    Chaos experiments now target the Dashboard operator and affect at most one pod. Added checks for readiness, permissions, fault injection, cleanup, and Dashboard health recovery.

    Documentation
    Documented prerequisites, safety controls, configuration, execution, isolation, and cleanup for operator chaos testing.

    Chores
    * Added a command to validate and run chaos end-to-end tests serially.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 484 lines (+363 / -121) across 6 files Reviewer: paulovmr Review duration: 11780m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.47) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.47 · 484 lines diff across 6 files
    0.47
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.370
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #9798"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.3% (MEDIUM) · Higher = larger blast radius
    47.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.7% · Safe to merge
    18.7%