← Back to Pull requests

feat: detect Azure quota errors and surface them as QuotaExceeded #6712

Open
unknown opened this pull request with 218 lines diff across 2 files
View on GitHub
unknown unknown commented on Aug 27, 2026 16:04 UTC
Author

Summary

Detect Azure quota errors from ARM responses and return HTTP 500 with a clear QuotaExceeded error code, rather than allowing operations to hang or return generic errors.

Problem

When Azure returns quota errors (e.g. PublicIPCountLimitReached, QuotaExceeded), the backend does not surface these as clear error responses. Operations may hang, time out, or return generic errors that hide the root cause. As observed in AROSLSRE-872, the inflight check retried 337–365 times before backing off with no clear error surfaced to the caller.

Design decisions

  • Capacity errors excluded: OverconstrainedZonalAllocationRequest and OverconstrainedAllocationRequest are transient Azure placement failures, not quota violations. They are intentionally excluded — mixing them would send customers down the wrong remediation path.

  • HTTP 500: Quota errors are not transient from the ARM client's perspective — they won't resolve on retry without a quota increase request. The distinct error code lets monitoring distinguish quota failures from other errors.

  • Regex scoping: Message-based regex patterns require "quota" or "resource" context to avoid false positives on connection/retry/rate limit messages.
  • Changes

  • ARM error code map for known quota error codes

  • Message-based regex fallback (scoped to avoid false positives)

  • Unit tests covering positive matches, false-positive prevention, and capacity error exclusion
  • References

  • Jira: AROSLSRE-875

  • Related: AROSLSRE-872

  • Related: ARO-27659
  • Diff: 218 lines (+163 / -55) across 2 files Reviewer: ahitacat Review duration: 61954m
    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 · 218 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.322
    Real PR Conversation Timeline
    1 comments
    "Review active on #6712"
    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%
    Repository