← Back to Pull requests

AAP-94885: fix: eliminate proxy-env ConfigMap oscillation on proxy-configured clusters #787

Closed
unknown closed this pull request without merging on Oct 09, 2026 09:33 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 14:29 UTC
Author

Root cause

AAP-94885 — Introduced in MR!169 (142ba4d): the chatbot role wrote the proxy-env ConfigMap a second time per reconciliation to inject AAP service hostnames into NO_PROXY. Because the second write produced different content, Kubernetes incremented the ConfigMap's resourceVersion, which fired a new watch event, which queued a new reconciliation — infinitely, on any cluster with a proxy configured and a chatbot secret defined.

Related: AAP-83822, AAP-84164, AAP-91490

What changed

roles/common/tasks/main.yml — added three tasks before the ConfigMap write:
1. Pre-read the chatbot secret (skipped if chatbot_config_secret_name is unset)
2. Extract aap_gateway_url hostname → _aap_gateway_hostname
3. Extract aap_controller_url hostname → _aap_controller_hostname

The single ConfigMap write in common now includes the AAP hostnames from the start, so the rendered template is identical on every subsequent reconciliation — apply: yes returns ok, no resourceVersion change, no new watch event.

roles/chatbot/tasks/main.yml — removed the two tasks that caused the loop:

  • Set AAP service hostnames for NO_PROXY exclusion

  • Re-apply proxy environment ConfigMap with AAP service hostnames
  • How it was tested

    Deployed the unpatched production image (lightspeed-rhel9-operator@sha256:e8e661766de6bf6885244e41b627086843086e70c81b514d122d24bc7a140f05) on a ROSA cluster with HTTP_PROXY/HTTPS_PROXY set and a chatbot secret configured.

    Before fix: the re-apply task returned changed: true on every reconciliation; resourceVersion kept incrementing (58820 → 61279 → ...).

    After fix: mounted the patched role files into the running pod via ConfigMap subPath volume. Next reconciliation showed changed=0 in the PLAY RECAP; resourceVersion remained stable at 61279 across multiple reconciliation cycles.

    Test plan

  • Deploy with HTTP_PROXY/HTTPS_PROXY set and a valid chatbot secret

  • Confirm proxy-env ConfigMap is created with AAP hostnames in NO_PROXY on the first reconciliation

  • Confirm ConfigMap resourceVersion does not change on subsequent reconciliations

  • Confirm no infinite reconciliation loop
  • 🤖 Generated with Claude Code

    Diff: 310 lines (+232 / -78) across 3 files Reviewer: redhat-chai-bot Review duration: 1144m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.63) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 310 lines diff across 3 files
    0.63
    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.343
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.063
    Real PR Conversation Timeline
    1 comments
    "Review active on #787"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    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: 63.4% (MEDIUM) · Higher = larger blast radius
    63.4%
    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: 25.1% · Safe to merge
    25.1%