Skip to content

feat(config): add optional metadata to component groups#262

Open
liunan-ms wants to merge 1 commit into
microsoft:mainfrom
liunan-ms:liunan/comp-group-metadata
Open

feat(config): add optional metadata to component groups#262
liunan-ms wants to merge 1 commit into
microsoft:mainfrom
liunan-ms:liunan/comp-group-metadata

Conversation

@liunan-ms

@liunan-ms liunan-ms commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR is the second PR for adding metadata support, adding an optional [component-groups.<name>.metadata] block that reuses the existing OverlayMetadata schema — the required category plus optional commits, bugs, and upstreamable.

Metadata is documentation only: it does not affect how group members are resolved, filtered, or built. It gives component groups the same provenance-tracking surface that overlays already have, so consumers can record why a group exists (e.g. azl-pruning, backport-dist-git) and link back to commits / bugs.

Changes

  • internal/projectconfig/component.go — reuse OverlayMetadata on ComponentGroup.
  • internal/projectconfig/configfile.go — wire group-metadata validation into ConfigFile.Validate.
  • internal/projectconfig/loader_test.go — coverage for the new field.
  • docs/user/reference/config/component-groups.md — reference doc updates.
  • schemas/azldev.schema.json + scenario snapshots — regenerated via mage docs.

Testing

  • mage docs — schema and CLI docs regenerate cleanly (no diff after commit).
  • Unit tests updated in loader_test.go.

Notes

  • Metadata is excluded from component fingerprints, consistent with how overlay metadata is handled — editing it never invalidates build caches.
  • No behavioral change to resolution or build.

Copilot AI review requested due to automatic review settings July 2, 2026 02:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an optional [component-groups.<name>.metadata] block by reusing the existing OverlayMetadata schema, allowing component groups to carry documentation-only provenance (category/commits/bugs/upstreamable) and enforcing validation during config load.

Changes:

  • Add Metadata *OverlayMetadata to ComponentGroupConfig and expose it in the JSON schema.
  • Validate group metadata via ConfigFile.Validate() (reusing OverlayMetadata.Validate() rules).
  • Add unit tests and update user docs / regenerated schema snapshots.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/projectconfig/component.go Adds optional metadata to component group config using OverlayMetadata.
internal/projectconfig/configfile.go Hooks component-group metadata validation into ConfigFile.Validate().
internal/projectconfig/loader_test.go Adds tests covering group metadata parsing/validation.
docs/user/reference/config/component-groups.md Documents the new metadata block for component groups.
schemas/azldev.schema.json Regenerated schema: adds component-groups.*.metadata referencing OverlayMetadata.
scenario/snapshots/TestSnapshotsContainer_config_generate-schema_stdout_1.snap Regenerated snapshot reflecting schema update.
scenario/snapshots/TestSnapshots_config_generate-schema_stdout_1.snap Regenerated snapshot reflecting schema update.

Comment thread internal/projectconfig/loader_test.go
Comment thread internal/projectconfig/loader_test.go Outdated
Comment thread internal/projectconfig/loader_test.go Outdated
Comment thread docs/user/reference/config/component-groups.md Outdated
Comment thread internal/projectconfig/configfile.go Outdated
Add an optional [component-groups.<name>.metadata] block reusing the
existing OverlayMetadata schema (required category plus commits, bugs,
and upstreamable). Metadata is documentation only and does not affect
how group members are resolved or built. Validation is wired into
ConfigFile.Validate. Regenerate JSON schema; update reference docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@liunan-ms liunan-ms force-pushed the liunan/comp-group-metadata branch from de9c745 to a86ff65 Compare July 2, 2026 04:10
@liunan-ms liunan-ms marked this pull request as ready for review July 2, 2026 04:59
Copilot AI review requested due to automatic review settings July 2, 2026 04:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants