DSC should pass the `name` field to resource invocations as metadata
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 523
- Forks
- 75
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 24
Description
Summary of the new feature / enhancement
As a DSC resource author, I want to be able to provide trace messages with as much usable context to consumers as possible, including the specific resource instance that is being invoked.
Currently, resources don't have access to the name field from a resource instance in a configuration document, so readers of the resource trace messages may not understand which resource instance emitted those messages.
Proposed technical implementation details (optional)
Standardize passing the name field to DSC resources when using dsc config commands as part of the _metadata struct.
Resource authors would have to implement their resources to include the instance name if passed through metadata. For direct invocations with dsc resource commands, the resources shouldn't expect to receive a name for the instance.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the dsc config command path into resource invocations and locate the _metadata structure or equivalent. Done means configuration-based resource invocations receive the resource instance's name as metadata, while direct dsc resource invocations do not expect one; add or update coverage where the existing invocation behavior is tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100