feat(metadata): centralize schemas, catalog sync and backfill - #113
Merged
Jared Holgate (jaredfholgate) merged 20 commits intoSep 16, 2026
Merged
Jared Holgate (jaredfholgate) merged 20 commits into
Jared Holgate (jaredfholgate) merged 20 commits into
Conversation
Package shared Bicep/Terraform metadata schemas and authoring commands, add dual-source catalog generation and a guarded workflow, and provide review-only backfill adapters with complete Bicep owner-snapshot support. Production rollout and source wiring remain opt-in. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Code Coverage OverviewLanguages: PowerShell PowerShell / code-coverage-agentThe overall line coverage in commit fb50ef1 in the Show a line coverage summary of the most impacted files.
Updated |
Test results 12 files + 6 1 224 suites +342 43m 6s ⏱️ + 35m 36s Results for commit fb50ef1. ± Comparison against base commit 25f1f4b. This pull request removes 80 and adds 598 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Exercise the manifest-exported API, whole-batch ancestor/child disable checks, and two-sided source-wiring consent. Update the completed slice validation record. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merge the Bicep management foundation and preserve one shared repository-file publisher. Make plan-only strictly read-only, remove the CODEOWNERS enable-variable gate, and add manual review-only metadata backfill to the existing Bicep workflow. Retain Terraform defaults and all publication identity/scope guards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Declare every catalog output and destination in config.json. Drive collection, generation, workflow repository selection, and publication from the validated manifest, and reject stale manifest-bound bundles without loosening publication guards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Merge origin/main ed61c74 while retaining the separate metadata ownership policy and both generators' guards. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 96a4bb65-5ac2-4970-9acb-cc8445533884
Merge main ed61c74 while preserving strict metadata dry runs and the explicit BAMI activation gate. Keep metadata backfill outside legacy/BAMI tenant parsing, identity candidates, state access, and repository mutations. Add workflow and driver regressions, retain separate token scopes, and record the coordinated ownership/Bicep branch updates and merged public-template audit. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
12 tasks
Consolidate the engineering-only metadata ownership policy into this implementation. Use flat owner handles and versioned schema references without tier or authored schemaVersion. Remove tier generation and tools-configuration publication. Derive deprecation from Bicep DEPRECATED.md and descendants or Terraform repository archive state, preserve legacy retirement status, and validate collected evidence. Update migration, repository creation, CSV projections, and rollout documentation for the simplified contract. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require both approved teams on the final metadata basename rule, allowing either team to satisfy code-owner review. Add the user-approved module-owners default Terraform write access without changing environment reviewers, CODEOWNERS-file protection, BAMI controls, or general approval requirements. Record coverage and the clean Opus follow-up in the metadata review groups progress slice. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Jared Holgate (jaredfholgate)
added a commit
to Azure/bicep-registry-modules
that referenced
this pull request
Sep 16, 2026
## Description Add initial module-owned metadata directly to this repository, allow metadata review by either engineering owners or module owners, and keep metadata-only changes out of automatic publishing workflows. - Add **572 `metadata.json` files: 222 roots and 350 children**. All 573 `main.bicep` directories were inventoried; the unpublished internal `avm/ptn/ai-ml/ai-foundry/modules/project` helper is excluded. - Root `owners` is a **flat string array**. Preserve all **281 username entries**, their order/casing, and every MEMBER/MAINTAINER handle incorporated from the supplied 2026-09-10 snapshot and official indexes. Thirteen roots have more than two owners; nine genuinely missing owner lists remain `owners: []`. No deleted legacy team or replacement owner is invented. - Authored metadata contains **no `schemaVersion` or `tier`**. The versioned `$schema` URL remains unchanged. Children do not author owners. Bicep deprecation is derived from existing `DEPRECATED.md`; no lifecycle field or deprecation/source edit is introduced here. - End `.github/CODEOWNERS` with exactly `metadata.json @Azure/azure-verified-modules-engineering-owners @Azure/azure-verified-modules-module-owners`, after every module/tooling rule. **Approval from either team qualifies; approval from both is not required.** Other ownership remains unchanged. - Append `!avm/**/metadata.json` to all **217** current per-module resource, pattern, and utility publishing workflows. Generic validation/tag-preview remains eligible for metadata changes. Manual release/approval controls and both existing `main.json`/`version.json` release selectors remain unchanged. - Cover root/nested/unindexed ownership, final precedence, metadata-only/mixed/source/version changes, child release selection, and explicit manual releases with offline regressions. ### Approved metadata reviewer policy Commit **2fe528df6fe20f849fb79055589677098357680c** implements the user-approved two-team OR policy. It changes only `.github/CODEOWNERS`, the module governance assertion, and the focused ownership tests. The final basename rule covers root, child, deep, utility, pattern, resource, and unindexed metadata paths. Tests reject missing approved teams, an unapproved third team/person, narrowed coverage, and shadowing rules. All **572 metadata files**, source/deprecation files, workflow filters, release selectors, and manual controls are unchanged from the approved shape below. No GitHub access or review settings are changed. ### Approved authored-shape update Commit **7f3502d7fb3cb9aa4e6e37911b494205b9619230** changes only the 572 metadata files: remove `schemaVersion`, remove root `tier`, and replace root owner objects with ordered string arrays. Any nonempty qualified team would be retained as an array entry; this backfill had none. Compared with baseline `7fe0438eff8b2b9f4595ec39254c2e2a3213e6e7`, native JSON checks verify that **every unaffected raw field value is identical**, including `$schema`, names, descriptions, canonical types, telemetry, aliases, and comments. All owner strings and their order are preserved. Nine empty owner arrays and fourteen approved unpublished-child telemetry omissions are retained. All 572 files pass the ready shared schema and current source-literal validation. No source, compiled template, version, workflow, governance, deprecation, or test file changed in this shape-update commit. Its actual staged and committed diffs both select **zero module release templates**. ### Main integration and readiness Merged `origin/main` **dfa9bab2c46e97b018b0d7b987537f738f6c0ef5** into this published branch without rebasing or force-pushing, in merge commit **7fe0438eff8b2b9f4595ec39254c2e2a3213e6e7**. That merge includes [#7351](#7351), BAMI canary validation-variable selection, and [#7348](#7348), the PostgreSQL configuration update. BAMI changes validation tenant/subscription bindings, not workflow inventory or release selection. Its selected-BAMI checks, legacy behavior for unselected modules, and credential isolation remain unchanged. A subsequent read-only compatibility check of main through **f1f4ba28698437d9a683d68bf181341ad3547e48** found two newer commits affecting 18 root modules. Their names, descriptions, telemetry identifiers, canonical types, and all release/governance assumptions remain compatible with this metadata. Those newer main commits were **not merged** during the metadata-shape or reviewer-policy updates. Any required final integration/revalidation remains an explicit rollout gate; checks on this branch do not claim to cover an unmerged combined tree. The review's module changes remain metadata additions only. No extra `main.bicep`, `main.json`, `version.json`, module README, changelog, runtime backfill workflow, approval files, reviewed flags, live settings changes, workflow dispatches, or remote merges are introduced. ### Telemetry and existing data Fourteen uninstrumented, unpublished resource children intentionally omit `telemetryIdPrefix`. Each lacks a version file, publishing-allowlist entry, index entry, and telemetry resource. [BCPFR4](https://azure.github.io/Azure-Verified-Modules/spec/BCPFR4) requires top-level telemetry but exempts nested children unless enabled for direct publishing. Their parents emit telemetry; [BCPFR7](https://azure.github.io/Azure-Verified-Modules/spec/BCPFR7) also requires resource parents to disable telemetry on referenced published modules. Redis child publishing was explicitly rolled back for upcoming service deprecation in [#7096](#7096). The backfill preserves these **pre-existing issues for separate source/release follow-up**: - Budget `rg-scope` and `sub-scope` currently emit `46d3xbcp.res.consumption-budget_mgscope`. Metadata records the actual source value, not the differing CSV values. - Resource Graph query currently emits `46d3xbcp.resourcegraph-query`, without `.res.`. Metadata preserves this exact, narrowly supported legacy identifier. - The existing compiled `avm/ptn/sa/conversation-knowledge-mining/main.json` lacks metadata name/description fields. Its new metadata matches current Bicep literals; compiled output is left untouched by this change. Metadata-only edits, including `telemetryIdPrefix`, do not publish. Publishing an output-affecting metadata change still requires a normal source change with generated `main.json`, or a `version.json` release change. ### Enforcement and coordinated rollout Active default-branch ruleset **23285568 still has `require_code_owner_review=true` and one required approving review**, with no separate required-reviewer list. Both approved teams are visible and have existing write access. GitHub treats multiple owners on the same CODEOWNERS line as alternatives, so either team's approval satisfies this metadata ownership requirement, not both. Existing authorized AVM App bypass settings are untouched; actor details were not exposed by the read credential and remain an operator-verification prerequisite. CODEOWNERS enforcement uses the adopted base-branch rule. Previously reported unrelated owner-access warnings are not changed by this policy update. Follow the [coordinated rollout plan](https://github.com/Azure/azure-verified-modules-tools/blob/jaredfholgate-module-metadata-implementation/docs/metadata-rollout.md): operator-approved Bicep Sync pause before the metadata tools merge, and resume only after repository and generated governance agree on the exact two-team rule and the operator approves scheduled applies. - **Sole active tools dependency:** [Azure/azure-verified-modules-tools#113](Azure/azure-verified-modules-tools#113) at **db2cf27af7befc4bf1e8dc271f2da084489c62df** consolidates the shared schema, authoring, catalog, and generated CODEOWNERS policy. Its exact final two-team rule matches this registry head `2fe528df6fe20f849fb79055589677098357680c`. The updated v1 schema must be available before consumers validate the flat authored shape against its public URL. - **Final tools CI confirmed on that exact head:** [CI run 35123274927](https://github.com/Azure/azure-verified-modules-tools/actions/runs/35123274927) passed all **11 jobs**, including three operating-system builds and six integration legs. [Configuration validation](https://github.com/Azure/azure-verified-modules-tools/actions/runs/35123274975) passed both jobs, and [CodeQL](https://github.com/Azure/azure-verified-modules-tools/actions/runs/35123270783) passed. All **17 reported current-head checks are successful**. The tools review remains OPEN/MERGEABLE, but GitHub reports BLOCKED for an unverified policy reason; successful CI does not establish that every merge or rollout gate is satisfied. - Historical policy work [Azure/azure-verified-modules-tools#120](Azure/azure-verified-modules-tools#120) is **CLOSED as superseded, not merged**, after its full history was consolidated into the tools implementation. Its branch is retained and it is no longer a separate merge dependency. The generator repair [Azure/azure-verified-modules-tools#119](Azure/azure-verified-modules-tools#119) is merged. - Public workflow template/contribution guidance: [Azure/Azure-Verified-Modules#2929](Azure/Azure-Verified-Modules#2929) is merged. Public process documentation remains a separate draft in [Azure/Azure-Verified-Modules#2936](Azure/Azure-Verified-Modules#2936) at `5ff656df746a0a3e1c213438cc56621959f55cec`. ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Validation | Result | | --- | --- | | Current reviewer policy: ownership and release regression suites | **355 passed**, zero failures/skips; covers either approved team, unindexed/deep metadata and unapproved third owners | | Current reviewer policy: change boundary | Exactly three governance files; all 572 metadata files and release controls unchanged | | Current reviewer policy: committed release diff | **Zero publishable templates** selected | | Authored shape: ready schema and source literals | **572 passed**; schema SHA256 `BE3945F44CABE20C6DD078911D762B18CB684C29E59D8CA830666C06A45AE087` | | Authored shape: unaffected raw values and owner order | All 572 files match the original values; all 281 usernames preserved | | Authored shape: actual staged/committed diff, Prettier and whitespace | Zero release templates; all 572 formatting checks passed | | Prior main integration: combined BAMI/CI-parameter and metadata regressions | 387 passed at `7fe0438` | | Prior main integration: Actionlint 1.7.12 | 221 publishing workflows/templates passed; three unsupported `queue` diagnostics in unchanged `avm.module.yml` reproduce on main | | Prior upstream PostgreSQL source/test compilation | Both compiled without rewriting files; two existing API/module-age warnings | The original three per-module YAML formatting warnings in api-center.service, azd.apim-api, and sa.content-generation remain unchanged. No concurrency or release control was weakened to silence an older linter. Fresh automatic checks are evaluated on exact reviewer-policy head `2fe528df6fe20f849fb79055589677098357680c`; no Azure deployment/release workflow was dispatched. ## Type of Change <!-- Use the checkboxes [x] on the options that are relevant. --> - Azure Verified Module updates: - [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation - [x] Update to CI Environment or utilities (Non-module affecting changes) ## Checklist - [x] I'm sure there are no other open Pull Requests for the same update/change - [ ] I have run `Set-AVMModule` locally to generate the supporting module files. - [ ] My corresponding pipelines / checks run clean and green without any errors or warnings - [ ] I have updated the module's CHANGELOG.md file with an entry for the next version `Set-AVMModule`, module changelogs, and Azure deployment validation are intentionally not applicable to the metadata-only module diff. Offline results and pre-existing tool/compiler warnings are recorded above. <!-- Please keep up to date with the contribution guide at https://aka.ms/avm/contribute/bicep --> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Jack Tracey (jtracey93)
previously approved these changes
Sep 16, 2026
Integrate upstream provider-alias preservation at 25f1f4b without changing the metadata contract or two-team ownership policy. The only conflict was in the changelog; retain both sets of release notes. Incoming pins, provider transforms, and regressions remain unchanged. Full local pre-commit and 33 targeted native integration cases passed. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove ecosystem migration modes and legacy-record fallback. Compare generated implementation identities with source CSV rows, not preview destinations or row totals. Require an explicit Force override for removals at generation and publication, and recheck immutable source evidence before writing. Preserve metadata-backed compatibility fields, deprecation, authoring warnings, backfill isolation, and existing publication controls. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 16, 2026
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
Implements module-owned metadata across Bicep and Terraform, centrally managed schemas, temporary backfill tooling, repository creation, catalog publication, and the two-team metadata review policy in one tools change.
Current published and verified head:
fb50ef1565088e84d7797fa756d199a7873243f2. The reported merge conflict is resolved: mergecd9b321322fe1d4ce01d8de927ae362c43e5a68fintegrated main25f1f4b2ca24505f9e1888542172322a6be6bc4a, preserving the provider-alias fix from #124. Only CHANGELOG needed manual resolution; both sets of notes were retained. No rebase or force-push.The complete ownership branch from #120 remains included by history-preserving merge. That separate review is closed as superseded, not merged, and its branch is retained. This is the sole tools prerequisite.
Metadata-only generation and source CSV protection
The latest user decision replaces dual-source migration modes:
bicep_mode,terraform_mode,BicepMode, andTerraformMode. Every generated catalog entry and CSV row requires valid module metadata; no full record is reconstructed or retained from legacy CSV values.test-*.csvpreview. The same guard works when a later reviewed manifest makes source and destination the same file.force, plus-ForceonInvoke-ModuleCatalog.ps1andPublish-ModuleCatalog.ps1. Force permits the listed source-row removals only. Scheduled runs cannot select it.sourceCsvRows,csvRowRemovalsentries (sourceFile,moduleName,repoURL), and booleancsvRowRemovalsForced. Errors and warnings identify the affected source rows.WhatIf, or publication approvals.Simplified authored metadata
ownersis a flat array such as["username", "@Azure/team-name"]. Usernames are bare and teams qualified. Empty arrays are valid, all owners are retained, and case-insensitive duplicates or malformed entries fail validation.tier, authoredschemaVersion, or lifecycle/status field. The required versioned$schemaidentifies the input format. No future tier automation is implemented.avm/..., Terraform root., childrenmodules/{name}. The output schema now requiresmetadataSource: "metadata".Deprecation from existing signals
DEPRECATED.mdmarks the containing module and all descendants Deprecated, not parents or siblings.archivedflag marks all modules in that repository Deprecated.Permanent authoring, creation, and temporary backfill
avm metadata showonly reads existing metadata.validatechecks a file or explicit-InputObject;initializecreates missing files from supplied values without overwriting existing ones. Normal authoring chains validate root/child metadata, warning on missing files during rollout and failing invalid existing files. The catalog change does not alter that authoring policy. Permanent authoring commands do not depend on CSV conversion.Repository creation initializes metadata from explicit request inputs before first publication. It retains primary/secondary compatibility parameters, additional usernames, optional qualified team, and resource namespace/type inputs required by the compatibility inventory. Inventory/app publication, authentication preflight, Portal controls and non-writing plans remain. No tier input; inventory CSVs never supply metadata.json values.
CSV conversion, backfill-only source inference, owner snapshots and migration adapters remain outside Avm.Authoring under
repository-management/module-metadata. Existing files, branches and reviews are preserved. These temporary scripts can be retired after reconciliation; source CSV collection and row-retention checks are permanent catalog safeguards.Backfill requires
workflow_dispatchand explicitmetadata_backfill=true; the runtime rejects non-manual workflow events. The catalog never creates metadata files. Metadata-only Terraform backfill skips legacy/BAMI tenant parsing, identity/state access, repository settings, unrelated formatting, CODEOWNERS and project updates.Preview publication
test-*.csvfiles beside canonical inputs underdocs/static/module-indexes; do not rename, delete or overwrite the originals in this change.v1/modules.json, the approved MAR string-array mirror, and the migration report in the public documentation repository.CanonicalType, not Tier.Ownership and workflow safeguards
Both ownership templates and current-output validation require the exact final basename rule:
Either listed team's eligible approval may satisfy code-owner review; both are not required. General approval counts are unchanged. A metadata owners array does not grant permissions or reviewer eligibility.
Both teams must be visible and have repository write access. The user explicitly approved the default Terraform module-owners team configuration with
repositoryPermission: "push"andenvironmentApproval: false. This is configuration for a future authorized ordinary sync, not a live permission change or part of metadata-only backfill. Existing teams, environment reviewers, engineering-only CODEOWNERS-file protection and the existing App bypass remain unchanged.Keep the approved BAMI activation gate and separate Variables token, CI's Azure credential check, strict plans, trusted main/environment/app boundaries, and publication checks. Previously removed catalog/general pause variables remain removed; no new gate removal is included here.
Current rollout state and documentation
The Bicep prerequisite has already merged. Azure/bicep-registry-modules#7349 merged at
2026-09-16T16:57:27Z, merge commitd654b23520d7ed224201c9b74b0322df269dfefc, from reviewed head2fe528df6fe20f849fb79055589677098357680c. Do not treat it as an outstanding merge or alter its historical branch/body. Its 572 flat metadata files preserve all 281 owner entries, nine empty roots, 14 telemetry omissions and unrelated raw values; this catalog change does not alter them. The shared template Azure/Azure-Verified-Modules#2929 is also merged.The rollout plan records the originally planned merge sequence. The remaining tools-side compatibility and operator gates still apply: verify the actual Bicep Sync state, obtain approval for any pause/enable operation, and do not run incompatible tooling against the merged governance rules. This session has not verified or changed live workflow state or target permissions. No further Bicep merge is required for this prerequisite.
Azure/Azure-Verified-Modules#2936 remains a future-process draft at
ef15455cf14a7f514e40d7615e5f78e9bdec2b7a. Its owner independently verified this published executable contract and updated the body/references, including the completed Bicep merge, without further file changes. The prose covers source-only generation, source CSV removal protection, ownership/orphaning/adoption, deprecation, and compatibility policies.Human approval, compatible synchronization, actual access verification, canonical CSV changeover, pre-source proposal handling and internal Azure-Verified-Modules-Docs runbook alignment remain adoption gates. Proposal approval/issue tracking is separate from catalog visibility; no unsupported metadata home is invented.
Validation
./build.ps1 pre-commitpassed 1,513 unit tests (eight existing skips) and 493 component tests, with zero errors, failures, invalid cases or unexecuted tests in persisted NUnit reports.ef15455; Bicep reported 355 local regressions and all six checks successful at reviewed head2fe528dfbefore its merge.fb50ef1565088e84d7797fa756d199a7873243f2: full CI passed all 11 jobs, including three OS builds and six integration legs; configuration passed both jobs; CodeQL succeeded. All 17 reported checks on this exact head are successful, with no retry required for this head. Local and remote heads match and the worktree is clean.GitHub reports OPEN/MERGEABLE rather than conflicting, with mergeStateStatus BLOCKED despite every reported check succeeding. The remaining policy reason is unverified; no merge was attempted. No production dispatch/fleet sync, live permission/variable/archival change, workflow enable/disable, new credentials/scopes, or force-push was performed by this implementation session.