← Back to Pull requests

Add Kusto Cost report msi #7916

Closed
unknown closed this pull request without merging on Nov 12, 2026 19:07 UTC
View on GitHub
unknown unknown commented on Nov 03, 2026 00:12 UTC
Author

<!-- Link to Jira issue -->
<ticket link>

What

Adds a dedicated user-assigned managed identity for the KustoCost cost reporter and grants it
read-only access:

  • Global pipeline (kusto-cost-reporter step): creates the identity (kusto.costReporting.identityName,

  • default kusto-cost-reporter) in the global resource group and assigns it Cost Management
    Reader
    and Reader on the global subscription
    (modules/logs/kusto/cost-reporter-subscription-roles.bicep).
  • Geography pipeline (kusto-cost-reporter-access step, kusto-infra resource group): grants the

  • identity database-scoped Viewer on ServiceLogs, HostedControlPlaneLogs and
    MonitoringEvents. No cluster-wide access.
  • Config: new kusto.costReporting.identityName key with schema entry and a default in

  • config.yaml. Rendered dev configs are regenerated.

    The identity is always created; there is no feature flag.

    Why

    We need to generate a Kusto cost report for the INT/STG/PROD Kusto clusters. The report is produced by
    KustoCost
    (sdp-pipelines), which runs as an EV2 Shell step and authenticates only as a managed identity. A
    service-connection run works for INT but cannot be used for PROD, so the report needs its own
    identity with least-privilege access to billing data and the Kusto databases. Keeping it separate
    from existing identities means the reporter cannot ingest, administer or write anything.

    Testing

    No unit/integration/E2E tests added: this is Bicep, pipeline and config only, and the repo has no
    test harness for role assignments.

  • config/make materialize passes (schema validation and helm fixtures); only the six

  • config/rendered/dev/* files change.
  • Both Bicep templates compile (bicep build).

  • <state here whether you deployed this to INT and ran the report with the identity; I haven't

  • verified the final flag-free version in a live deployment>

    Special notes for your reviewer

  • Always on: the geography step only runs in the int/stg/prod regions its resource group is

  • constrained to. All of those have kusto.manageInstance: true, so the database grant always finds
    its cluster.
  • Dev/CI side effect: the global pipeline step also runs in dev, perf, pers and ci00-02, so those

  • environments now create the identity and the subscription-level role assignments in their own
    subscriptions. If that is unwanted, the flag can be reintroduced; please say so.
  • The identity name is read by sdp-pipelines (kusto.costReporting.identityName), which will be

  • bumped to the merge commit after this lands.

    PR Checklist

  • PR is scoped to a single task (no mixed concerns)

  • Title follows Conventional Commits format

  • Summary explains the "Why" behind the change

  • Linked to relevant ticket/issue

  • Screenshots included (if dashboards or other UI changes) — N/A

  • Self-reviewed the diff

  • CI/CD checks are passing (ignore Tide)

  • Draft PR used for WIP (if applicable)

  • Commit history is clean (rebased/squashed)

  • Tricky code blocks are commented

  • Specific reviewers tagged

  • All comment threads resolved before merge
  • Diff: 413 lines (+309 / -104) across 5 files Reviewer: stevekuznetsov Review duration: 14094m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.45) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.45 · 413 lines diff across 5 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%
    56%
    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.361
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #7916"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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.9% (MEDIUM) · Higher = larger blast radius
    44.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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 19.4% · Safe to merge
    19.4%
    Repository