ImpactIQ v3: headless, resumable rewrite with Azure DevOps automation (no service principal) - #1
Merged
Conversation
…tive script Preparation for the headless/resumable refactor: - Config/SheetContract.json: every sheet and expected column the Power BI Governance Model template reads, generated from the template's own ExpectedColumns lists, so the assembler can guarantee the contract. - PSScriptAnalyzerSettings.psd1: PowerShell 5.1 + 7.0 compatibility rules. - Legacy/: untouched copy of the current monolithic script as a fallback. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
Work-in-progress snapshot of the new Config/Modules/*.ps1 files (context, logging, state and checkpoints, HTTP wrapper, tool runner, inventory, model and DAX stages). Not yet integrated or tested; later commits complete the set, add the entry point, pipeline, docs, and tests. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
Work-in-progress snapshot; modules are still being completed and have not been integrated or tested together yet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
… (snapshot) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
…kup (snapshot) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
…hot) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
…apshot) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
…tomation - ImpactIQ.ps1 entry point + Config/Modules (Common, Auth, Http, State, Tools, Interactive, Inventory, Dax, Bim, Models, Reports, Dataflows, Extras, Assemble) - Auth without a service principal: DeviceCode with encrypted refresh-token cache (AES or DPAPI), Credential (ROPC), AzContext, AccessToken, Interactive; corrected GCC High / DoD resource hosts; GCC uses the commercial authority - Per-item checkpoints and manifest under State/runs/<RunId>; resume rules; -TimeBudgetMinutes with Paused status and exit code 3 - HTTP wrapper with retry/back-off/paging/LRO; process runner with timeouts - Model detail via Tabular Editor, pure-PowerShell TMSL parser, Fabric getDefinition fallback, or DAX INFO.VIEW queries - New collectors: dashboards, tiles, users, parameters, DQ schedules, capacities, run summary, failures; optional admin scanner/activity and usage metrics - Azure DevOps pipeline + template (state restore, artifacts, exit-code mapping, unexpanded-macro guard), docs, validation report, Pester suite (565 tests) - Audit fixes in the C# extractors (CSV escaping, per-report error handling, ExtractErrors.txt, JSON path typo, env-var driven folders) - Original script kept unchanged under Legacy/ Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs
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
ImpactIQ v3: the 3,740-line interactive script is now a headless-capable, resumable, modular tool that produces the same four workbooks and backup folders, plus an Azure DevOps pipeline that runs it without a service principal or an Azure VM.
Written for the owner's situation: Power BI Premium (P SKU) on a GCC tenant, no Fabric, no service principal, Azure DevOps available.
What changed
ImpactIQ.ps1+Config/Modules/ImpactIQ.*.ps1replace the monolith.Final PS Script.txtis now a thin interactive launcher with the v2 experience (dialogs, browser sign-in, pickers). The original is kept untouched inLegacy/.-NonInteractiveplus parameters orIMPACTIQ_*environment variables for every former prompt. No scope given headless means the run stops instead of scanning the tenant by accident.State\runs\<RunId>\the moment it finishes. Re-running skips finished items and retries failures.-Resume Autoalso picks up an unfinished run from a previous day.-TimeBudgetMinutesstops cleanly before a hosted-agent job cap, assembles partial workbooks, exits3(Paused) and resumes on the next scheduled run.DeviceCode(pure OAuth device-code flow with an encrypted refresh-token cache, AES for hosted agents or DPAPI on a self-hosted box, optional Teams/Slack webhook for the code),Credential(ROPC for MFA-exempt accounts, with AADSTS error mapping),AzContext,AccessToken, and the originalInteractivemode. GCC uses the commercial authority with the GCC resource; the GCC High and DoD resource hosts were wrong in v2 and are corrected.Retry-After, 5xx, network errors, one token refresh on 401, paging), timeouts and captured output for every Tabular Editor and pbi-tools process, per-item failure records and aFailuressheet, exit codes0/1/2/3, atomic manifest writes, secret redaction in logs..bim) parser produces the same Semantic Models and Measure Dependencies CSVs, a FabricgetDefinitionfallback fetches the model definition where Fabric exists, and a DAXINFO.VIEW.*path covers models where neither is available (-ModelDetailMethod Auto|TabularEditor|Bim|Dax|Both).-IncludeAdminApis(admin groups, Scanner API, activity events) and-IncludeUsageMetrics(per-workspace usage-metrics model via DAX). Existing sheets and columns are unchanged, so the current.pbitkeeps working.pipelines/azure-pipelines.ymlwith a reusable template: scheduled runs, state restored from the previous run's artifact, outputs and backups published as artifacts, optional commit of the workbooks to adatabranch so the Power BI template can read them overWeb.Contentswith a PAT.docs/Automation.md(decision matrix),Auth-Options.md,Azure-DevOps.md,Headless-and-Resume.md,Data-Coverage.md,Validation-Report.md(audit findings and what was fixed).docs/Validation-Report.md).Test plan
.ps1ImpactIQ.ps1 -NonInteractive -Environment USGov -AuthMode DeviceCode -AllWorkspacesIMPACTIQ_TOKEN_CACHE_KEYset, completing the device code from the logWindows-only paths (Tabular Editor 2, pbi-tools, DPAPI, WinForms, real Power BI and Fabric APIs) could not be executed in the Linux build environment.
docs/Validation-Report.mdsection 4 lists exactly what to check on Windows.🤖 Generated with Claude Code
https://claude.ai/code/session_01KVTWDExuXsqoqNTb5sFUJs