microsoft / microsoft/finops-toolkit

FOCUS 1.4 phase 2: add FOCUS 1.3 hub functions (HubSetup_v1_3.kql)

Open
#2,127 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Tool: FinOps hubs Tool: FOCUS
Dominant language
PowerShell
Stars
603
Forks
249
Avg merge
7d 11h
Merged PRs (30d)
11

Description

Parent: #2120
Depends on: #2124 (phase 1 ingestion)

Goal

Add the hub-side counterpart to phase 1: a new `HubSetup_v1_3.kql` exposing FOCUS 1.3-shaped functions (`Costs_v1_3()`, `Prices_v1_3()`, `CommitmentDiscountUsage_v1_3()`, `Recommendations_v1_3()`, `Transactions_v1_3()`), plus update `HubSetup_Latest.kql` so the unversioned `Costs()` and friends alias to v1_3.

Backward compatibility: `Costs_v1_3()` unions data from `Costs_final_v1_3`, `Costs_final_v1_2`, and `Costs_final_v1_0`, transforming the older shapes up to v1_3 (extending the existing v1_2 → v1_0 union pattern).

Scope

File: `HubSetup_v1_3.kql` (new)
  1. Copy `HubSetup_v1_2.kql` as the starting point.
  2. Rename functions: `_v1_2` → `_v1_3`. Update docstring "FOCUS 1.2" → "FOCUS 1.3".
  3. Update each `Costs_v1_3()`, `Prices_v1_3()`, etc. function to union the new `*_final_v1_3` table.
  4. Up-convert v1_2 and v1_0 data to v1_3 shape:
    • For `Costs`: extend with empty/null defaults for the 8 new FOCUS 1.3 columns; populate `ServiceProviderName` from `ProviderName` and `HostProviderName` from `PublisherName` for 1.0/1.2 data.
File: `HubSetup_Latest.kql` (modify)

Update the latest-aliases to point at `_v1_3()` instead of `_v1_2()`.

Files: `app.bicep` and `.build.config`

Wire in `HubSetup_v1_3.kql` alongside the existing versioned scripts.

Out of scope
  • Contract Commitment dataset (phase 3)
  • FOCUS 1.4 (phases 4-5)

Branch

`flanakin/focus14-phase2-hubs-1.3` off `flanakin/focus14`. PR target: `flanakin/focus14`.

Done when

  • New file deploys cleanly (Bicep compile passes).
  • Existing 192 Pester tests still pass.
  • Unversioned `Costs()` returns the v1_3 schema (8 new columns visible).
  • v1_2 data still queryable via `Costs_v1_2()` and via `Costs()` (up-converted).
  • PR opened against `flanakin/focus14`.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing HubSetup_v1_2.kql with the existing versioned hub scripts and inspect the v1_2-to-v1_0 union pattern. Update HubSetup_v1_3.kql, HubSetup_Latest.kql, app.bicep, and .build.config as specified, then run the Bicep compile and existing 192 Pester tests. Done means the v1_3 schema is exposed, older data remains queryable, and deployment passes.

Written by the indexing model from the issue text.

Assessment

Domain
backend, build-system, cloud
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.