← Back to Pull requests

AAP-85721: Warn before deleting job templates in use by workflows #3827

Open
unknown opened this pull request with 219 lines diff across 2 files
View on GitHub
unknown unknown commented on Oct 24, 2026 18:47 UTC
Author

Summary

Restores the AAP 2.4-style delete warning when removing a job template that is referenced by workflow job template nodes.

In 2.6/2.7 the confirmation dialog only showed the template name with no dependency notice. Deleting a single job template now queries related workflow job template nodes and surfaces an in-use warning with the node count (and a general impact note for multi-delete). Fixes AAP-85721 for the job-template → workflow-node case.

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

  • Jira: AAP-85721

  • Related (not fixed here): AAP-99473 (controller should reject credential delete when in use); broader in-use warnings for projects/inventories/credentials can follow in separate PRs
  • Manual Testing

    1. Create a job template (e.g. delete_me)
    2. Create a workflow job template and add delete_me as a node
    3. Templates → delete delete_me
    4. Confirm the dialog warns the JT is in use and lists Workflow Job Template Nodes with count
    5. Delete an unused JT and confirm no in-use warning appears

    Diff: 219 lines (+164 / -55) across 2 files Reviewer: swatinarvekar Review duration: 60566m
    All Vouch review confidence checks passed
    Residual risk 0.24 = Change Risk (0.44) × (1 − Review Confidence (0.45)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.44 · 219 lines diff across 2 files
    0.44
    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%
    44%
    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.323
    Real PR Conversation Timeline
    1 comments
    "Review active on #3827"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 44.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: 43.7% (MEDIUM) · Higher = larger blast radius
    43.7%
    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: 44.7% · Lower = rushed or shallow review
    44.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: 24.2% · Safe to merge
    24.2%