← Back to Pull requests

fix(idc): make IDC↔Keycloak federation resilient to transient network errors #917

Closed
unknown closed this pull request without merging on Sep 23, 2026 08:32 UTC
View on GitHub
unknown unknown commented on Sep 22, 2026 09:56 UTC
Author

Problem

During workshop install, the IDC ↔ Keycloak federation step (configure_identity_center.py, run via workshop post-install) intermittently fails with Playwright net::ERR_NETWORK_CHANGED on the first page.goto to the AWS console sign-in URL. When it fails, IDC is left unconfigured and SCIM provisioning is skipped — surfacing downstream as ⚠ SCIM admin group not found and broken ArgoCD SSO.

Observed in SetupIDE SSM logs:

Signing into AWS Console...
Error: Page.goto: net::ERR_NETWORK_CHANGED at https://signin.aws.amazon.com/federation?...
⚠ IDC configuration failed. Run manually: task workshop:idc:configure
⚠ SCIM admin group not found.

Immediately followed by Waiting for vLLM image build... (multi-GB download/push).

Root cause (two compounding issues)

1. Concurrency. workshop/Taskfile.yaml ran ray:setup — which launches a multi-GB docker build && docker push of the vLLM image in the background (nohup ... &, see cluster-providers/common/Taskfile.ray.yaml) — before post-install. The image push saturated/reconfigured the IDE network while headless Chromium was navigating, so Chromium aborted with ERR_NETWORK_CHANGED.
2. No resilience. A single transient page.goto failure aborted the whole run (fail-fast), with no retry.

Fix

  • Reorder the workshop install so post-install (idc:configure) runs before ray:setup. The background image push can no longer race the Playwright navigation.

  • Add goto_with_retry() in configure_identity_center.py: retries page.goto on transient network errors (ERR_NETWORK_CHANGED, ERR_TIMED_OUT, ERR_CONNECTION_RESET, ...) with exponential backoff, and re-raises non-transient errors immediately. All four page.goto call sites now use it.
  • Testing

  • Unit-tested goto_with_retry: retry-then-succeed on transient error, immediate propagation of non-transient errors, raise-after-exhaustion. All pass.

  • python3 -m py_compile and YAML/task --list parse checks pass.

  • Re-ran task idc:configure end-to-end on a live workshop hub: IDC now federated with Keycloak, 6 users + 4 groups provisioned via SCIM, admin group membership synced for ArgoCD SSO.
  • Diff: 277 lines (+207 / -70) across 3 files Reviewer: shapirov103 Review duration: 1356m
    All Vouch review confidence checks passed
    Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 277 lines diff across 3 files
    0.45
    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.337
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #917"
    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: 44.6% (MEDIUM) · Higher = larger blast radius
    44.6%
    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: 17.6% · Safe to merge
    17.6%