← Back to Pull requests

fix(awx): persist schedule credentials selected in the UI (AAP-89449) #3906

Open
unknown opened this pull request with 248 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 15, 2026 12:24 UTC
Author

Summary

  • Fix schedule credentials being silently dropped on save when the selected credential matches a job template default. useProcessCredentials no longer treats launch-config defaults as already associated with the schedule.

  • Diff associate/disassociate only against existing /schedules/:id/credentials/ results (same pattern as instance groups), gated by ask_credential_on_launch.

  • Process credentials when the prompt list is present but empty so clear/replace works from usePostAccessories.

  • Add unit coverage for the AAP-89449 case (associate a template-default credential when the schedule has none).
  • Fixes AAP-89449.

    Type of Change

  • Bug fix

  • Enhancement

  • Tests

  • Documentation

  • Other (please specify)
  • Risk Analysis - REQUIRED

  • High — Broad platform impact (e.g., SWR config, shared framework components, authentication, routing, API wrappers, build/bundler config). Changes affect multiple workspaces or could cause widespread regressions.

  • Medium — Scoped but cross-cutting (e.g., shared utility functions, changes to multiple pages within one workspace, component library updates, test infrastructure). Limited blast radius but touches common code paths.

  • Low — Narrowly scoped (e.g., single page fix, styling tweak, documentation, test-only changes, copy/string updates). Minimal risk of unintended side effects.
  • Dependencies

    None.

    Testing

    Manual Testing

    1. Create a job template with ask_credential_on_launch=true and a default Machine credential.
    2. Go to Templates → [JT] → Schedules → [Schedule] → Edit.
    3. In Prompts, select that credential (or another), continue, and save.
    4. Reopen the schedule → Edit → Prompts and confirm the credential is still selected.
    5. In Network, confirm POST .../schedules/<id>/credentials/ with {"id": <credential_id>}.

    Unit tests: useProcessCredentials.test.tsx (6 tests).

    Diff: 248 lines (+186 / -62) across 3 files Reviewer: redhat-chai-bot Review duration: 3036m
    All Vouch review confidence checks passed
    Residual risk 0.21 = Change Risk (0.39) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 248 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.330
    Real PR Conversation Timeline
    1 comments
    "Review active on #3906"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 38.9% (MEDIUM) · Higher = larger blast radius
    38.9%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 20.8% · Safe to merge
    20.8%