Skip to content

Fix version format mismatch in ftkver.txt#1940

Merged
flanakin merged 2 commits into
devfrom
fix/1885-ftkver-format
Jan 13, 2026
Merged

Fix version format mismatch in ftkver.txt#1940
flanakin merged 2 commits into
devfrom
fix/1885-ftkver-format

Conversation

@flanakin

Copy link
Copy Markdown
Collaborator

Summary

  • Fixes config_InitializeHub pipeline failure when loading open data files from GitHub
  • The version in ftkver.txt (e.g., 12.0) now matches the git tag format (e.g., v12)

Root Cause

The Get-Version.ps1 script was producing versions like 12.0 from package.json's 12.0.0, but git tags are created as v12 (without the .0). This caused URLs like:

  • https://raw.githubusercontent.com/microsoft/finops-toolkit/refs/tags/v12.0/src/open-data/PricingUnits.csv

To fail because the tag v12.0 doesn't exist - only v12 exists.

Fix

Added a regex pattern to strip trailing .0 from major versions:

  • 12.012
  • 12.112.1 (unchanged)
  • 12.0-dev12-dev (unchanged, already handled)

Test plan

  • Run ./src/scripts/Get-Version.ps1 and verify it returns 13 (not 13.0)
  • Deploy a hub and verify config_InitializeHub pipeline succeeds

Closes #1885

🤖 Generated with Claude Code

Strip trailing .0 from version (e.g., 12.0 → 12) so URLs constructed
with the version match the git tag format (v12 not v12.0).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 11:42
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Needs: Review 👀 PR that is ready to be reviewed label Jan 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a version format mismatch that was causing the config_InitializeHub pipeline to fail when loading open data files from GitHub. The version in ftkver.txt (e.g., 12.0) now matches the git tag format (e.g., v12) by stripping the trailing .0 from major-only versions.

Changes:

  • Added a regex pattern to Get-Version.ps1 to strip trailing .0 from major versions (e.g., 12.012)
  • Updated changelog to document the fix under FinOps hubs v13

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/scripts/Get-Version.ps1 Added regex pattern to strip trailing .0 from major versions to match git tag format
docs-mslearn/toolkit/changelog.md Documented the version format fix under FinOps hubs v13 with issue reference

@flanakin flanakin enabled auto-merge (squash) January 13, 2026 11:53
@flanakin

Copy link
Copy Markdown
Collaborator Author

@microsoft-github-policy-service agree

@flanakin flanakin added this to the v13 milestone Jan 13, 2026
@flanakin flanakin merged commit 1f4e7f7 into dev Jan 13, 2026
4 checks passed
@flanakin flanakin deleted the fix/1885-ftkver-format branch January 13, 2026 12:19
flanakin added a commit that referenced this pull request Jan 31, 2026
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Version info for v12 in ftkver.txt is "12.0" but GitHub release is "v12"

4 participants