chore(comps): annotate azl-compatibility overlays with metadata#17887
chore(comps): annotate azl-compatibility overlays with metadata#17887liunan-ms wants to merge 3 commits into
Conversation
Migrate azl-compatibility components to the per-file overlay layout with file-level metadata. Each component's inline overlays move into per-group overlays/*.overlay.toml files (one file per logical group, even for single-overlay components), carrying a file-level [metadata] block with category and upstreamable. Multi-category components get one file per group, each stamped with that group's own category. overlay-files is intentionally NOT added (neither per-component nor in the distro default-component-config), so this is a pure restructuring: overlay values, order, and comp.toml comments are preserved byte-for-byte (validated as a structural no-op against 4.0). Components already migrated on the azl-pruning and overlay_metadata branches are skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enable per-file overlay discovery for every component by setting overlay-files = ["overlays/*.overlay.toml"] in the 4.0 stage1/stage2 default-component-config. This is what makes the migrated components' overlays/*.overlay.toml files load. Kept as a standalone latest commit so it can be reverted independently of the annotation migration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… BEFORE MERGE] TEMPORARY: this commit exists solely so the PR checks run against an azldev build that understands the new overlay-files / metadata / BugRef config. It MUST be reverted before the PR is merged. Pin azldev to 35d8fae562980db7bda057d79322cc51ddad8d62, the merged form of the overlay-files-after-resolution change (microsoft/azure-linux-dev-tools#256). This version supports inheriting overlay-files from a project-wide [default-component-config] and allows an empty overlay-files list to disable inherited patterns. Regenerate external/schemas/azldev.schema.json against the pinned tool so the authoritative schema knows the new metadata / overlay-files / BugRef fields. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR migrates all azl-compatibility (and adjacent-category) overlays for 27 components from inline overlays = [...] / [[components.<name>.overlays]] blocks in their .comp.toml files into per-group overlays/*.overlay.toml documents, each stamped with a file-level [metadata] block (category + upstreamable). It is presented as a structural no-op: overlays are neither added, removed, reordered, nor semantically changed, and rendered specs are claimed byte-identical. It also carries two clearly-labeled temporary commits needed only for PR checks.
Changes:
- Split 27 components' inline overlays into 42 new
overlays/*.overlay.tomlfiles, one per logical change group, preserving comments and adding taxonomy[metadata]; multi-category components get one file per group. Localsource/patch references are rewritten with a../prefix to resolve from theoverlays/subdir back to the component root. - Temporary (revert-before-merge): add
overlay-files = ["overlays/*.overlay.toml"]to the 4.0 stage1/stage2default-component-configso components inherit per-file overlay discovery. - Temporary (revert-before-merge): pin
.azldev-versionto35d8faeand regenerateexternal/schemas/azldev.schema.json(addsOverlayMetadata,BugRef,overlay-files, resources schema) so PR checks run against a tool that understands the new fields.
Reviewed changes
Copilot reviewed 72 out of 72 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
external/schemas/azldev.schema.json |
Regenerated schema adding OverlayMetadata/BugRef/overlay-files + resources defs (temporary). |
distro/azurelinux.distro.toml |
Adds inherited overlay-files discovery default to both 4.0 stages (temporary; sole discovery mechanism). |
.azldev-version |
Pins azldev to 35d8fae (temporary). |
base/comps/*/*.comp.toml (27 files) |
Removes inline overlays, leaving component config/release settings intact. |
base/comps/*/overlays/*.overlay.toml (42 files) |
New per-group overlay docs with [metadata]; ../ source paths verified against existing component-root files. |
Notes from review: source/patch ../ paths resolve correctly (all referenced files exist at component root), regex conversions from TOML literal to basic strings preserve escaping, and per-file numeric prefixes preserve original overlay order. Two items flagged: the load-bearing-yet-temporary distro discovery default, and apache-sshd/overlays/0001 missing upstreamable.
tobiasb-ms
left a comment
There was a problem hiding this comment.
I spot-checked some things and the fact that the spec renderer ran and didn't complain -- despite no changes to specs/ -- indicates this is a functional no-op. Approved.
|
I'm going through this PR and will post comments within the day. My main initial feedback is that the categorization is aggressively using azl-compatibility aggressively -- and in a way that I think will make the categorization less useful. |
reubeno
left a comment
There was a problem hiding this comment.
I don't think we need the data to be 100% accurate to get started, but I do want us to see if we're going to get the insights we need here.
|
|
||
| [metadata] | ||
| category = "azl-pruning" | ||
| upstreamable = false |
There was a problem hiding this comment.
Worth considering upstreamability here. Fedora will also need to move to 25 as the default at some point.
| @@ -0,0 +1,26 @@ | |||
| [metadata] | |||
| category = "azl-compatibility" | |||
There was a problem hiding this comment.
Why? Do we have any indication of what these changes were actually doing?
| # TODO: Remove this overlay once a new upstream release (> 1.0.3) is available. | ||
|
|
||
| [metadata] | ||
| category = "azl-compatibility" |
There was a problem hiding this comment.
I worry that azl-compatibility is being more widely used than expected. I see it used for tdnf compat symlinks, which is for compat with previous AZL versions, but this isn't really the same sort of change.
| @@ -0,0 +1,15 @@ | |||
| [metadata] | |||
| category = "azl-platform-adaptation" | |||
There was a problem hiding this comment.
The azldev docs call out this category for "architecture-specific" adaptation. Is this architectural?
| # Source: use full Azure Linux kernel tarball instead of pre-built headers. | ||
|
|
||
| [metadata] | ||
| category = "azl-platform-adaptation" |
| @@ -0,0 +1,9 @@ | |||
| [metadata] | |||
| category = "azl-compatibility" | |||
| upstreamable = false | |||
|
|
||
| [metadata] | ||
| category = "azl-compatibility" | ||
| upstreamable = false |
There was a problem hiding this comment.
Actually is upstreamable. And in fact, I believe Tobias already upstreamed it.
|
|
||
| [metadata] | ||
| category = "azl-compatibility" | ||
| upstreamable = false |
There was a problem hiding this comment.
This is an example of a set of changes that aren't directly upstreamable, but which we don't want to carry forever. How would you recommend we capture that?
| @@ -0,0 +1,17 @@ | |||
| [metadata] | |||
| category = "azl-compatibility" | |||
| upstreamable = false | |||
| regex = "%global dist.*" | ||
| replacement = "" | ||
|
|
||
| # TEMPORARILY remove release from the dependency on the shim unsigned packages |
There was a problem hiding this comment.
How do we capture that this is intended as a temporary workaround?
Summary
This PR migrates all
azl-compatibilityoverlay definitions to the per-file overlay layout with file-level metadata. This is a pure restructuring/annotation change — no overlay is added, removed, reordered, or semantically altered, and the rendered specs are byte-identical to 4.0.Complements the sibling PRs #17727, #17887, #17888 . Components already migrated on those branches are skipped.
Changes
chore(comps): annotate azl-compatibility overlays with metadata
overlays/*.overlay.tomlfiles (42 new overlay files)..comp.tomlcomments (including interior comments between overlay fields) are preserved verbatim into the overlay files.azl-pruning/overlay_metadatabranches are skipped.chore(distro): set overlay-files default-component-config -⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
Temporary. Sets overlay-files = ["overlays/*.overlay.toml"] in the 4.0 stage1/stage2 default-component-config, so every component inherits per-file overlay discovery (no per-component key needed). Standalone so it can be reverted independently.
chore(azldev): pin to 35d8fae and regenerate schema -⚠️ PR-CHECK ONLY, REVERT BEFORE MERGE
Temporary. Pins .azldev-version to 35d8fae (merged form of azure-linux-dev-tools#256: inheritable overlay-files + empty-list override) and regenerates external/schemas/azldev.schema.json so PR checks run against a tool that understands the new overlay-files / metadata / BugRef fields. Must be reverted before this PR merges.
Validation
✅ Structural no-op: all 27 components' reconstructed overlay lists are byte-identical to 4.0.
✅ azldev component list -a parses cleanly (7424 components).
✅
comp renderin PR check passed.