[Open Data] Add instance size flexibility dataset from Azure Catalogs API#2199
[Open Data] Add instance size flexibility dataset from Azure Catalogs API#2199RolandKrummenacher wants to merge 5 commits into
Conversation
…API (#2090) Adds a new InstanceSizeFlexibility open data dataset to replace the deprecated ISF CSVs hosted on ccmstorageprod.blob.core.windows.net (AutofitComboMeterData.csv and isfratioblob.csv / aka.ms/isf), which Microsoft is retiring (no updates after 9 May 2026, removed 30 Aug 2026). - Update-InstanceSizeFlexibility.ps1 extracts ISF groups/ratios from the authenticated Azure Reservations Catalogs API (Microsoft.Capacity/catalogs), unioning the four ISF-bearing reserved resource types (VirtualMachines, BlockBlob, RedisCache, DedicatedHost) across a broad region set. - InstanceSizeFlexibility.csv is populated with 2,437 SKUs / 558 groups. - Weekly workflow refreshes the data via OIDC (maintainers must configure the AZURE_CLIENT_ID/TENANT_ID/SUBSCRIPTION_ID secrets; see workflow header). - Raw Microsoft ratios are kept for drop-in parity with the deprecated files (normalization available via -Normalize). Foundation only: Power BI and Optimization Engine consumers will be repointed to this dataset in a follow-up once it ships in a release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR introduces a new open-data dataset for instance size flexibility (ISF) ratios by generating InstanceSizeFlexibility.csv from the authenticated Azure Reservations Catalogs API, replacing reliance on deprecated static CSV blobs.
Changes:
- Added a PowerShell generator script to fetch, normalize (optional), and cache-merge ISF ratios from
Microsoft.Capacity/catalogs. - Added the generated
InstanceSizeFlexibility.csvopen-data artifact and documented it in open-data docs/README. - Added a scheduled GitHub Actions workflow to refresh the dataset weekly and open a PR when it changes.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/scripts/Update-InstanceSizeFlexibility.ps1 | New generator that pages the Catalogs API and emits the ISF CSV (with cache-merge + optional normalization). |
| src/open-data/InstanceSizeFlexibility.csv | New published open-data dataset containing ISF group/SKU/ratio rows. |
| .github/workflows/opendata-instance-size-flexibility.yml | Weekly automation to refresh the dataset and open an update PR. |
| src/open-data/README.md | Documents the new ISF dataset, its source, and manual update instructions. |
| docs/open-data.md | Adds a download tile linking to the CSV in the latest release assets. |
- Retry 429/5xx on the same Catalogs API page inside the inner retry loop instead of after it, so page counts and the retry cap stay correct. - Skip SKUs with placeholder ArmSkuName (e.g. 'arm_sku_name_placeholder') so preview/unreleased SKUs don't leak into the public CSV; removed the one such row that had reached InstanceSizeFlexibility.csv. - Document the canonical 3-column schema and why the deprecated Power BI connector columns aren't reproducible from the Catalogs API. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed the Copilot review (commit pushed):
On the column schema (raised in review discussion): the dataset intentionally uses the canonical three-column Catalogs API schema (
|
The repo already has an OIDC service principal with AZURE_CLIENT_ID/ TENANT_ID/SUBSCRIPTION_ID configured in the aoe-prod environment (used by the AOE deployment workflows). Reuse it via federated credentials instead of requiring new secrets: bind the job to the aoe-prod environment and follow the repo's established azure/login@hf_447_release pattern. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Update on the auth setup — no new secrets/SP needed. The earlier note said maintainers would need to create an OIDC service principal and I've updated the workflow to reuse that identity rather than create a parallel one:
So there's nothing to provision. The only residual is a one-time confirmation that the If you'd prefer the open data workflow not to borrow the AOE-named environment, a maintainer can create a dedicated |
flanakin
left a comment
There was a problem hiding this comment.
🤖 [AI][Claude Code] PR Review
Summary: Clean, well-structured addition that closely mirrors the established Update-CommitmentDiscountEligibility sibling pattern (cache-merge, paging, retry, weekly PR workflow). The earlier Copilot items (in-place 429/5xx retry, placeholder-SKU filtering) are already addressed in-tree, and the generator/CSV logic looks correct. Two non-blocking findings below.
⚠️ Should fix (1)
- No changelog entry. The sibling Commitment discount eligibility dataset shipped with an
### [Open data]changelog section; this is a comparably substantial external-facing dataset (2,436 SKUs, new download tile, weekly workflow) with no entry in the currentdocs-mslearn/toolkit/changelog.md. Add an### [Open data]entry under the next/unreleased version.
💡 Suggestions (1)
-Normalizeis typed[bool](requires-Normalize $true);[switch]would be more idiomatic PowerShell. Optional — the[bool]form does allow scripted toggling.
- Add changelog entry (Unreleased > [Open data]) and a matching "Instance size flexibility" section to the MS Learn open-data doc. - Make -Normalize a [switch] (idiomatic) instead of [bool]; update help and the README manual-update note accordingly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
|
The
The |
|
Two follow-ups: Open Data CI failure was transient — now green. The failure wasn't in the data or generator: the Thanks @helderpinto for confirming the |
Summary
Adds a new instance size flexibility (ISF) open data dataset, sourced from the authenticated Azure Reservations Catalogs API, to replace the two deprecated static CSVs hosted on
ccmstorageprod.blob.core.windows.net(AutofitComboMeterData.csvandisfratioblob.csv/aka.ms/isf). Microsoft is retiring those files — no updates after 9 May 2026, removed 30 Aug 2026.Addresses #2090. This implements the open-data-generation approach discussed on the issue: the authentication complexity lives only in the generator, so downstream tools consume a public CSV and need no Azure credentials. Consumer repoints are tracked separately in #2200.
What's included (foundation only)
src/scripts/Update-InstanceSizeFlexibility.ps1— extracts ISF groups/ratios fromMicrosoft.Capacity/catalogs. Handles both REST (ReservationsAutofit*) and PS-cmdlet (InstanceSizeFlexibility*) property names, pagination with in-place 429/5xx retry, placeholder-SKU filtering, and a cache-merge that preserves SKUs the API drops. Defaults to the four ISF-bearing reserved resource types (VirtualMachines, BlockBlob, RedisCache, DedicatedHost) unioned across a broad region set.src/open-data/InstanceSizeFlexibility.csv— populated with 2,436 SKUs / 557 groups of live data (3-column schema:InstanceSizeFlexibilityGroup,ArmSkuName,Ratio)..github/workflows/opendata-instance-size-flexibility.yml— weekly refresh; opens a PR on change.Coverage vs the deprecated files
InstanceSizeFlexibility.csvisfratioblob.csv(Optimization Engine)AutofitComboMeterData.csv(Power BI, frozen since 2023)Raw Microsoft ratios are kept as-is for drop-in parity with the deprecated files (normalization is available via
-Normalize).Schema (3 columns, by design)
The file uses the canonical Catalogs API ISF schema —
InstanceSizeFlexibilityGroup, ArmSkuName, Ratio— which is a 1:1 match for the Optimization Engine'sisfratioblob.csv. The Power BIAutofitComboMeterData.csvhad additional columns (ResourceLocation, meter IDs, composite key, normalized SKU), but those are Cost Management connector artifacts not exposed by the Catalogs API, so the Power BI repoint (#2200) will join onArmSkuNameinstead.Authentication
The Catalogs API is authenticated (
Microsoft.Capacity/catalogs/read). The workflow reuses the existing OIDC service principal from theaoe-prodenvironment (the same identity the AOE deployment workflows use), following the repo'sazure/login@hf_447_releasepattern — no new secrets to provision. The principal's subscription needs theMicrosoft.Capacityresource provider registered (done). A one-timeworkflow_dispatchafter merge confirms the principal can read the catalog.Test plan
armSkuNamefallback all confirmed)Modified: 0across all regions)workflow_dispatchafter merge to confirm CI auth path🤖 Generated with Claude Code