Skip to content

Use resource names in dsclinux and dscpm exports - #15

Merged
Bpoe merged 3 commits into
mainfrom
bpoe-resource-export-names
Oct 26, 2026
Merged

Bpoe merged 3 commits into
mainfrom
bpoe-resource-export-names

Conversation

@Bpoe

@Bpoe Bpoe commented Oct 26, 2026 •

Copy link
Copy Markdown
Owner

DSC uses the export-only _name property to populate each resource's top-level configuration name. Without it, exported resources receive generated names such as groups-52 instead of meaningful labels. Raw labels can contain problematic characters, while user/system services and multiple installed RPM versions can otherwise share labels.

Emit RFC 3986 percent-encoded _name labels for Linux groups and services, APT repositories (including the legacy DscExtras.Apt/Repository alias), and packages:

  • Groups, repositories, APT packages, and system-scoped services use name.
  • Non-system-scoped services use name,scope, distinguishing user services from system services with the same name.
  • RPM packages use name,version, distinguishing multiple installed versions of install-only packages.

Compose the label before encoding. Leave only ASCII letters, digits, and -._~ unchanged; encode spaces as %20, literal + as %2B, and other bytes as %HH. Original resource properties and Get, Test, and Set output remain unchanged.

Declare _name as an optional read-only string in all affected schemas. Extend JSON Lines and DSC integration coverage for percent encoding, scope-aware service labels, preserved resource identities, and distinct RPM versions; update the export documentation.

Brandon Poe and others added 3 commits October 26, 2026 13:13
Emit _name metadata alongside existing name properties for dsclinux and dscpm exports. Declare the metadata in resource schemas and cover DSC top-level naming in integration tests.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
URL-encode _name without changing resource name properties. Use name,version for RPM exports to keep install-only package versions distinct, while retaining name-only labels for APT.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Percent-encode export labels with spaces as %20, preserving only RFC 3986 unreserved bytes. Append scope to non-system service labels before encoding so user and system services do not share export names. Preserve original resource properties and RPM version-qualified labels.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@Bpoe
Bpoe merged commit 4a073f5 into main Oct 26, 2026
28 checks passed
@Bpoe
Bpoe deleted the bpoe-resource-export-names branch October 26, 2026 21:44
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.

1 participant