PowerShell / PowerShell/DSC

Define model for handling configuration expressions for non-recursive DSC group and adapter resources

Open
#730 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Enhancement Needs Triage
Dominant language
Rust
Stars
523
Forks
75
Avg merge
3d 16h
Merged PRs (30d)
24

Description

Summary of the new feature / enhancement

As a user, I want to be able to use functionality like dependsOn for nested resource instances in adapter and group resources, regardless of whether those resources are recursively invoking dsc itself.

As a developer, I don't want to implement my group and adapter resources to duplicate logic and handling for configuration expressions, but to be able to rely on DSC resolving those expressions.

In #695, the implementation was updated so that DSC doesn't recursively parse and handle configuration expressions for nested instances in group or adapter resources.

Currently, the PowerShell adapters just ignore the dependsOn field for nested instances. They invoke the instances in their declared order.

DSC does resolve some of the expressions, like concat() and resourceId. Other expressions that require deferring, like reference(), don't work.

For implementations of adapter resources and group resources that don't recursively invoke dsc, these expressions require the developer to implement handling in their own code.

Proposed technical implementation details (optional)

Ideally, we could provide a model for handling these expressions on behalf of the resource, but I can't think of a non-complex way to do so.

Potentially, we could provide handling for these use cases in the eventual RDKs for each language and make that functionality a core component of the RDK spec.

Otherwise, I foresee folks either not being able to use (many) expressions for nested instances or implementing their own custom behavior that may or may not align to the engine semantics for non-nested instances.

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 with issue #695 and the current PowerShell adapter behavior described here. Trace how DSC resolves concat(), resourceId, and deferred reference() expressions for nested instances, then define a model that lets non-recursive group and adapter resources use consistent expression handling. Done means the model and its integration scope are agreed for these nested-resource cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.