microsoft / microsoft/finops-toolkit
SavingsPlan workbook queries exceed ARG's documented 3-join limit
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 603
- Forks
- 249
- Avg merge
- 7d 11h
- Merged PRs (30d)
- 11
Description
🛠️ Problem
The two queries in src/workbooks/optimization/SavingsPlan/SavingsPlan.workbook ("Savings plan Summary" and "Savings plan details") each contain 4 join operators, above Azure Resource Graph's documented limit of 3 joins per query:
joinon advisor suppressions (on stableId)joinon advisor configurations, subscription level (on subscriptionId)joinon advisor configurations, resource group level (on subscriptionId, resourceGroup)join kind=inneronresourcecontainers— only to fetch the subscription display name
ARG currently executes the queries without error (verified during PR #2225 testing), so this is a latent risk rather than an active failure: if the documented limit starts being enforced, both tiles break.
💡 Suggested fix
Drop join #4 and render the subscription name via a workbook column formatter / parameter instead — this is exactly why the equivalent Reservations queries (Reservations.workbook, commitment.workbook) stay at 3 joins. That also removes the join that had the innerunique data-loss bug fixed in PR #2225.
ℹ️ Additional context
- 19 other workbook queries sit exactly at the 3-join ceiling (no headroom for future joins); only these two exceed it.
- Related: PR #2225 (repo-wide join/lookup review) fixed the bare-join data loss in these same queries but intentionally did not restructure them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open src/workbooks/optimization/SavingsPlan/SavingsPlan.workbook and inspect the “Savings plan Summary” and “Savings plan details” queries. Compare their subscription-name handling with Reservations.workbook and commitment.workbook, and review PR #2225 for context. Done means both queries stay within three joins while still displaying the subscription name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100