Add FOCUS 1.4 schema tests and changelog entries#2136
Draft
flanakin wants to merge 23 commits into
Draft
Conversation
Adds IngestionSetup_v1_3.kql with Costs/Prices/CommitmentDiscountUsage/ Recommendations/Transactions transforms and final tables renamed for FOCUS 1.3. Cost and Usage gains 8 new FOCUS 1.3 columns: AllocatedMethodId/Details/ResourceId/ResourceName/Tags (data-generator split cost allocation), ContractApplied (per-row contract commitment application), ServiceProviderName + HostProviderName (replacing the deprecated ProviderName/PublisherName, with empty-fallback for back compat). Costs_raw now carries the new columns so downstream v1_2 transforms keep working and v1_3 transforms can read them directly. The v1_3 file is wired into the Bicep deployment alongside v1_0 and v1_2. The unversioned Costs() function still aliases to v1_2 — phase 2 adds Costs_v1_3() and retargets Latest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds HubSetup_v1_3.kql with Costs_v1_3, Prices_v1_3, CommitmentDiscountUsage_v1_3, Recommendations_v1_3, and Transactions_v1_3 that union the new Costs_final_v1_3 with the existing Costs_final_v1_2 and Costs_final_v1_0 tables. For v1_2 data unioned into the v1_3 view, the 8 new FOCUS 1.3 columns default to null/empty and ServiceProviderName/HostProviderName are populated from the deprecated ProviderName/PublisherName for back compat. The same defaults apply to the v1_0 union arm on top of the existing v1_0 -> v1_2 conversion. HubSetup_Latest.kql aliases now point to *_v1_3 functions so the unversioned Costs(), Prices(), etc. return the latest schema. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the FOCUS 1.3 Contract Commitment supplemental dataset: - ContractCommitment_raw table in IngestionSetup_RawTables.kql with the 14 mandatory FOCUS 1.3 columns plus standard hubs source metadata. - ContractCommitment_transform_v1_3 + ContractCommitment_final_v1_3 in IngestionSetup_v1_3.kql, with update policy mapping raw to final. - ContractCommitment_v1_3 hub function in HubSetup_v1_3.kql that reads the final table directly (no older versions to union). - Unversioned ContractCommitment alias in HubSetup_Latest.kql. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds IngestionSetup_v1_4.kql as a preview schema for FOCUS 1.4 working_draft. Cost and Usage drops the deprecated ProviderName and PublisherName columns (removed in 1.4 per spec). Contract Commitment expands by 14 new columns: BenefitCategory, ContractCommitmentApplicability (JSON), Created, DiscountPercentage, DurationType, FulfillmentInterval, LastUpdated, LifecycleStatus, Model, OfferCategory, PaymentInterval, PaymentModel, PaymentUpfrontPercentage, PricingCurrencyContractCommitmentCost. The internal ProviderName/PublisherName fix-up logic in the Costs transform stays so HostProviderName / ServiceProviderName can fall back to those values when source data does not yet supply them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds HubSetup_v1_4.kql with the v1_4-preview-shaped hub functions. Costs_v1_4 unions Costs_final_v1_4, Costs_final_v1_3, Costs_final_v1_2, and Costs_final_v1_0; ProviderName and PublisherName are dropped from the v1_4 project list (removed in 1.4 per spec). ContractCommitment_v1_4 unions ContractCommitment_final_v1_4 with ContractCommitment_final_v1_3 and extends v1_3 data with empty/null defaults for the 14 new FOCUS 1.4 columns. HubSetup_Latest.kql is intentionally NOT retargeted to v1_4. Per the preview convention in data-model.md, unversioned aliases stay pinned to the latest GA schema (v1_3) until v1_4 promotes from preview to GA. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Updates plugin skill files so plugin guidance reflects the new hub schemas and FOCUS columns added in this milestone: - finops-hubs.md: lists the full set of unversioned functions (CommitmentDiscountUsage, ContractCommitment included), notes the v1_0 / v1_2 / v1_3 / v1_4-preview versioned variants, and enumerates the FOCUS 1.3 column additions plus the 1.4 ProviderName / PublisherName removal. - finops-hubs-deployment.md: extends the supported FOCUS export versions to 1.0r2 / 1.2 / 1.2-preview (current Cost Management) and notes that hubs can also ingest 1.3 / 1.4-preview when Cost Management ships those exports. - ftk-database-query.md: expands from four to six analytic functions, adds CommitmentDiscountUsage and ContractCommitment sections, and surfaces the FOCUS 1.3 columns on the Costs() reference table. - ftk-output-style.md: adds FOCUS 1.3+ terminology preferences for ServiceProviderName, HostProviderName, and ContractApplied. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- HubsFocusSchemas.Tests.ps1: 108 Pester tests asserting the FOCUS 1.3 and 1.4-preview schema additions land where expected: Costs_raw additions, ContractCommitment_raw definition with both 1.3 and 1.4 columns, presence of versioned transforms and final tables in IngestionSetup_v1_3 / v1_4, presence of versioned hub functions in HubSetup_v1_3 / v1_4, the union arms in Costs_v1_3 and Costs_v1_4, the Latest aliases pinned to v1_3 (not preview v1_4), and the Bicep / build-config wiring. - changelog.md: adds v15.0.0 hub entries describing the FOCUS 1.3 GA and 1.4-preview schema additions, the new ContractCommitment dataset, the unversioned alias retarget, and the upgrade-procedure refresh. Adds a plugin entry for #2119. Updates ms.date to today. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Consolidates FOCUS 1.3 and 1.4 column additions into a single v1_4 ingestion setup file. Removes the intermediate v1_3 file, adds ContractCommitment_raw table definition, and updates app.bicep and .build.config to reference v1_4. Co-Authored-By: Claude <noreply@anthropic.com>
…cus14-phase2-hubs-1.3
Renames HubSetup_v1_3.kql to HubSetup_v1_4.kql, consolidating all hub functions (including ContractCommitment) for FOCUS 1.4 GA. Updates HubSetup_Latest.kql to alias all unversioned functions to v1_4. Updates app.bicep and .build.config to reference v1_4. Co-Authored-By: Claude <noreply@anthropic.com>
Updates all FOCUS version references from 1.3/1.4-preview to v1_4 GA. Removes intermediate v1_3 function references. Marks ContractCommitment as FOCUS 1.4+ (not 1.3+). Removes preview designations for v1_4. Co-Authored-By: Claude <noreply@anthropic.com>
Updates Pester tests to validate v1_4 (not v1_3) schema files, removes tests for the eliminated intermediate v1_3 schema, and corrects HubSetup_Latest assertions to expect _v1_4() aliases. Updates changelog to reflect FOCUS 1.4 GA release without preview designation. Co-Authored-By: Claude <noreply@anthropic.com>
- Pluralize ContractCommitments_raw / _transform_v1_4 / _final_v1_4 / mapping / update policy - Add BillingPeriods_raw + IngestionSetup_v1_4 transforms/finals/policies (FOCUS 1.4 supplemental dataset) - Add InvoiceDetails_raw + IngestionSetup_v1_4 transforms/finals/policies (FOCUS 1.4 supplemental dataset) - Add 12 ContractCommitment* per-row columns + CommitmentProgramEligibilityDetails + InvoiceDetailId to Costs_raw, Costs_final_v1_4, and Costs_transform_v1_4 - Fix x_Source* annotations on ContractCommitments_raw to Hubs v1_4+ - Update Costs_raw ProviderName/PublisherName annotations to FOCUS 0.5-1.3 (removed in 1.4; kept for back compat) - Update Costs_raw Region annotation: deprecated -> removed - File #2159 for the FOCUS 1.4 native-columns architecture research 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
3 tasks
…cus14-phase2-hubs-1.3
- Rename ContractCommitment_v1_4() -> ContractCommitments_v1_4() (and update folder label) - Add BillingPeriods_v1_4() and InvoiceDetails_v1_4() hub functions - Add BillingPeriods(), ContractCommitments() (renamed), and InvoiceDetails() unversioned aliases in HubSetup_Latest.kql - Add CommitmentProgramEligibilityDetails + 12 ContractCommitment* + InvoiceDetailId column defaults to Costs_final_v1_0 and Costs_final_v1_2 union arms (back-compat shims) and add them to the project list 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
…-phase6-plugin # Conflicts: # src/templates/finops-hub/.build.config # src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/app.bicep # src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/HubSetup_v1_4.kql # src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/IngestionSetup_RawTables.kql # src/templates/finops-hub/modules/Microsoft.FinOpsHubs/Analytics/scripts/IngestionSetup_v1_4.kql
- Rename ContractCommitment() -> ContractCommitments() in skill references and agent docs - Add BillingPeriods() and InvoiceDetails() to the function list and dedicated agent doc sections - Mention the new FOCUS 1.4 per-row columns (CommitmentProgramEligibilityDetails, 12 ContractCommitment* columns, InvoiceDetailId) - Update output-style guidance to reference all three supplemental datasets 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
…hase7-tests-changelog
A merge artifact from rebasing on the v1_3 ancestry left a singular ContractCommitment() function referencing ContractCommitment_v1_3() in HubSetup_Latest.kql. v1_3 was eliminated and the dataset was pluralized to ContractCommitments_v1_4(); the orphan would fail to load on hub deployment. Remove it. Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
…hase7-tests-changelog
Tests: - Pluralize ContractCommitments_raw / _final_v1_4 / _v1_4 assertions - Assert new BillingPeriods_raw + InvoiceDetails_raw datasets exist with their FOCUS 1.4 columns - Assert new BillingPeriods_v1_4(), InvoiceDetails_v1_4(), ContractCommitments_v1_4() hub functions - Assert HubSetup_Latest aliases for BillingPeriods(), ContractCommitments(), InvoiceDetails() - Assert Costs_raw and Costs_final_v1_4 include the 14 new FOCUS 1.4 columns - Assert NO singular ContractCommitment_raw / ContractCommitment_v1_4 / ContractCommitment() exists - Assert Costs_raw keeps removed ProviderName/PublisherName/Region for back compat Changelog: - Expand v15.0.0 entry with the 14 new FOCUS 1.4 columns and the three new supplemental datasets (ContractCommitments, BillingPeriods, InvoiceDetails) - Update plugin entry to list ContractCommitments() / BillingPeriods() / InvoiceDetails() 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Michael Flanakin <flanakin@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
Author
|
🤖 [AI][Claude Code] PR Update Summary Cascade of PR #2126 review feedback (tests + changelog):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HubsFocusSchemas.Tests.ps1Pester tests to validatev1_4schema files (removes allv1_3references)IngestionSetup_v1_3.kqlandHubSetup_v1_3.kqltest contexts (those files no longer exist)HubSetup_Latest.kqlalias assertions to expect_v1_4()instead of_v1_3()Test plan
pwsh -Command Invoke-Pester -Output Detailed -Path ./src/powershell/Tests/Unit/HubsFocusSchemas.Tests.ps1passes with all tests greenv1_3references remain in the test file🤖 Generated with Claude Code