Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/opendata-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
paths:
- 'src/open-data/*.csv'
- 'src/open-data/*.json'
# Internal operational baselines for the eligibility completeness guard, not
# reference data; Build-OpenData ignores them, so they shouldn't trigger CI.
- '!src/open-data/*.shardcounts.json'
permissions:
contents: write
pull-requests: write
Expand Down
54 changes: 24 additions & 30 deletions .github/workflows/opendata-commitment-eligibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

permissions:
contents: write
pull-requests: write

jobs:
update:
Expand All @@ -22,42 +21,37 @@ jobs:
shell: pwsh
run: src/scripts/Update-CommitmentDiscountEligibility.ps1

- name: Create PR if data changed
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_BODY: |
## Summary

Weekly automated update of commitment discount eligibility data from the
[Azure Retail Prices API](https://learn.microsoft.com/rest/api/cost-management/retail-prices/azure-retail-prices).

This file lists Azure meters that are eligible for Reserved Instances and/or
Savings Plans, used by FinOps Hubs to populate `x_CommitmentDiscountSpendEligibility`
and `x_CommitmentDiscountUsageEligibility` columns.

## Test plan

- [ ] Review the diff for unexpected changes (large drops in meter count, etc.)
- [ ] Spot-check a few meter IDs against the Azure Pricing Calculator

🤖 Generated by the **Update Commitment Discount Eligibility** workflow
# GitHub Actions is not permitted to open pull requests in this org, so we push
# a branch and surface a one-click "create PR" link in the job summary for a
# maintainer to open. Opening the PR triggers Open Data CI and normal review.
- name: Push branch and surface PR link if data changed
run: |
# Check for changes (handles both new file and modified file)
if git diff --quiet --exit-code -- src/open-data/CommitmentDiscountEligibility.csv 2>/dev/null && \
! git ls-files --others --exclude-standard | grep -q 'CommitmentDiscountEligibility.csv'; then
# Check for changes to the CSV or the per-shard baseline (handles both
# modified and newly-created/untracked files). The baseline is checked too
# so a counts-only update (no eligibility change) is still surfaced.
if git diff --quiet --exit-code -- src/open-data/CommitmentDiscountEligibility.csv src/open-data/CommitmentDiscountEligibility.shardcounts.json 2>/dev/null && \
! git ls-files --others --exclude-standard -- src/open-data/ | grep -qE 'CommitmentDiscountEligibility\.(csv|shardcounts\.json)'; then
echo "No changes detected"
exit 0
fi

BRANCH="opendata/commitment-eligibility-$(date +%Y%m%d)"
git checkout -b "$BRANCH"
BRANCH="opendata/commitment-eligibility-$(date +%Y%m%d)-${{ github.run_number }}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add src/open-data/CommitmentDiscountEligibility.csv
git checkout -b "$BRANCH"
git add src/open-data/CommitmentDiscountEligibility.csv src/open-data/CommitmentDiscountEligibility.shardcounts.json
git commit -m "chore: Update commitment discount eligibility data"
git push origin "$BRANCH"

gh pr create \
--title "[Open Data] Update commitment discount eligibility data ($(date +'%B %Y'))" \
--base dev \
--body "$PR_BODY"
PR_URL="${{ github.server_url }}/${{ github.repository }}/compare/dev...${BRANCH}?expand=1"
{
echo "### Commitment discount eligibility data updated"
echo ""
echo "Pushed branch \`${BRANCH}\`. GitHub Actions cannot open PRs in this repo, so open it manually:"
echo ""
echo "[**Create pull request →**](${PR_URL})"
echo ""
echo "Review the diff for unexpected changes (e.g. a large drop in meter count) and spot-check a few meter IDs against the Azure Pricing Calculator before merging to \`dev\`."
} >> "$GITHUB_STEP_SUMMARY"
echo "Branch pushed: $BRANCH"
echo "Open a PR here: $PR_URL"
9 changes: 8 additions & 1 deletion docs-mslearn/toolkit/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: FinOps toolkit changelog
description: Review the latest features and enhancements in the FinOps toolkit, including updates to FinOps hubs, Power BI reports, and more.
author: MSBrett
ms.author: brettwil
ms.date: 06/22/2026
ms.date: 06/29/2026
ms.topic: reference
ms.service: finops
ms.subservice: finops-toolkit
Expand Down Expand Up @@ -64,6 +64,13 @@ _Released June 2026_
- **Fixed**
- Corrected stale and incorrect descriptions for `BilledCost`, `EffectiveCost`, `BillingCurrency`, `BillingProfileId`, `BillingProfileName`, `CommitmentDiscountQuantity`, `ListUnitPrice`, `PricingQuantity`, `PricingUnitDescription`, and `TotalSavingsRunningTotal` to align with FOCUS 1.2 ([#2112](https://github.com/microsoft/finops-toolkit/pull/2112)).

### [Open data](open-data.md) updates

**[Commitment discount eligibility](open-data.md#commitment-discount-eligibility)**

- **Fixed**
- Fixed the commitment discount eligibility dataset refresh so it is reproducible and complete; retired meters now age out and previously missed meters are included ([#2164](https://github.com/microsoft/finops-toolkit/pull/2164)).

### [Optimization engine](optimization-engine/overview.md) updates

- **Fixed**
Expand Down
Loading
Loading