Add FOCUS 1.4 schema tests and changelog entries#2136
Draft
flanakin wants to merge 12 commits into
Draft
Conversation
- 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>
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>
…hase7-tests-changelog
…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 was referenced Jul 15, 2026
…into flanakin/focus14-phase7-tests-changelog
…rness Rework HubsFocusSchemas.Tests.ps1 per FOCUS-1.4-PLAN.md D6: - Check 1: glob-discover all IngestionSetup_v1_*/HubSetup_v1_* scripts and assert .build.config + app.bicep registration (covers the D9 split file and future versions automatically; prevents regression #1777) - Check 2 (new): version-string consistency with a data-driven allowlist (union arms, deprecation docstrings, known benign TODO) plus v1_3 and git conflict marker guards - Check 3 (new): exactly one enabled update policy schema version, derived from the highest discovered version; every raw source stays wired - Check 4: tightened union arm occurrence counts (5 managed datasets x 3 versions + 3 new v1_4-only datasets), back-compat _final_v1_4 arms in v1_0/v1_2 hub functions, _v1_0()/_v1_2() alias guards in HubSetup_Latest, and the D3 provider column rename round trip with an inversion guard Also reconcile the v15 changelog with what the stack ships: FOCUS 1.4 conversion behavior, three new datasets (empty until Cost Management exports FOCUS 1.4), v1_2 deprecation/policy disablement, provider column removal with down-conversion, and the dashboard repoint. All new checks were red-green validated against injected defects. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
|
W4 rework complete (commit 9eb79ca).
🤖 Generated with Claude Code |
Resolved changelog ms.date conflict to today per repo convention. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Updates HubsFocusSchemas.Tests.ps1 to pin the spec-prefixed column names (30 FOCUS columns, including new ContractCommitmentDescription and ServiceProviderName), asserts the old unprefixed names are gone, and adds exact 30-column count checks for the raw and final tables. Also updates the changelog dataset column count (28 -> 30) and notes the spec-aligned naming. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
|
Synced with phase 6 (dev merge + Q4 ContractCommitments spec alignment upstream). One conflict in Q4 follow-through:
Verified: |
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.
🛠️ Description
PR 4 of the FOCUS 1.4 stack (#2126 → #2128 → #2135 → #2136 → #2194). Delivers the static KQL regression harness (FOCUS-1.4-PLAN.md D6) plus the v15 changelog entries, and merges the upstream stack fixes.
Test harness (
src/powershell/Tests/Unit/HubsFocusSchemas.Tests.ps1)IngestionSetup_v1_*.kql/HubSetup_v1_*.kql(+HubSetup_Latest.kql) and asserts each is registered in.build.configcombineKql and loaded vialoadTextContentinAnalytics/app.bicep; also asserts versioned HubSetup files precedeHubSetup_Latest.kql. Automatically covers the D9 split file (IngestionSetup_v1_4_Datasets.kql) and any futurev1_5files. Prevents regression add IngestionSetup_v1_2.kql to build process #1777.*_v1_Ywhere Y ≠ the file's own version) must match a data-driven allowlist (cross-version union arms, deprecation docstrings, one known benign TODO). Also asserts nov1_3references and no git conflict markers in any KQL/Bicep file undersrc/templates/finops-hub/— both defects actually occurred on this stack..alter table ... policy updateblock; enabled policies must live in exactly one schema version (derived as the highest discovered, not hardcoded), older versions must be fully disabled, and every raw source table must stay wired to an enabled current-version policy (handles the C360ActualCosts_raw/AmortizedCosts_raw→Costs_rawretrofit).HubSetup_v1_4.kql; 3 new datasets read_final_v1_4only), back-compat_final_v1_4arms inHubSetup_v1_0.kql/HubSetup_v1_2.kql,HubSetup_Latest.kqlguards against_v1_0()and_v1_2()aliases with all 8 unversioned functions pointing at_v1_4(), and the D3 provider column rename round trip (ProviderName = HostProviderName/PublisherName = ServiceProviderNamedown-conversion present; inverted direct assignments guarded in the v1_4 files).Changelog (
docs-mslearn/toolkit/changelog.md)Reconciled the Unreleased "FinOps hubs v15.0.0" section with what the fixed stack ships: FOCUS 1.4 conversion behavior, new Costs columns, three new datasets (empty until Cost Management exports FOCUS 1.4), unversioned alias retarget, dashboard repoint, v1_2 transform deprecation + policy disablement, and
ProviderName/PublisherNameremoval with down-conversion. Removed thedocs/README.mdprocedure-refresh bullet (ships via #2123, not this stack). The internal ingestion-script split is not listed (no user-facing impact, consistent with v12/v14 granularity).Red-green validation
Each new check was validated against an injected defect in a throwaway edit, then reverted:
HubSetup_v1_4.kqlHas no git conflict markers in finops-hub KQL or Bicep filesCosts_transform_v1_2()reference inIngestionSetup_v1_4.kqlIngestionSetup_v1_4.kql only references other schema versions via allowlisted patternsv1_2policy flipped to"IsEnabled": trueEnables update policies in exactly one schema version+IngestionSetup_v1_2.kql has zero enabled update policiesIngestionSetup_v1_4_Datasets.kqlremoved from.build.configIngestionSetup_v1_4_Datasets.kql is registered in .build.config combineKqlHubSetup_v1_2.kqlHubSetup_v1_2.kql down-converts the provider columns in its v1_4 armServiceProviderName = ProviderNameadded toIngestionSetup_v1_4.kqlIngestionSetup_v1_4.kql does not invert the provider column mappingEach scenario failed exactly the targeted test(s); pristine state passes all 207 tests.
Verification
Invoke-Pester -Path ./src/powershell/Tests/Unit/HubsFocusSchemas.Tests.ps1— 207 passed, 0 failed.Invoke-Pester -Path ./src/powershell/Tests/Unit/*— 2047 passed, 0 failed, 4 skipped../src/scripts/Build-Toolkit finops-hub— exit 0.src/ordocs-mslearn/.📋 Checklist
🔬 How did you test this change?
📦 Deploy to test?
🙋♀️ Do any of the following that apply?
🤖 Generated with Claude Code