feat(config): add optional metadata to component groups#262
Open
liunan-ms wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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 *OverlayMetadatatoComponentGroupConfigand expose it in the JSON schema. - Validate group metadata via
ConfigFile.Validate()(reusingOverlayMetadata.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. |
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>
de9c745 to
a86ff65
Compare
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
This PR is the second PR for adding metadata support, adding an optional
[component-groups.<name>.metadata]block that reuses the existingOverlayMetadataschema — the requiredcategoryplus optionalcommits,bugs, andupstreamable.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— reuseOverlayMetadataonComponentGroup.internal/projectconfig/configfile.go— wire group-metadata validation intoConfigFile.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 viamage docs.Testing
mage docs— schema and CLI docs regenerate cleanly (no diff after commit).loader_test.go.Notes