PowerShell / PowerShell/DSC

DSC should pass the `name` field to resource invocations as metadata

Open
#783 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.