PowerShell / PowerShell/DSC

Mechanism to allow resources to affect `dsc` exit code

Open
#737 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

Example is the Assertion resource, if the assert fails, that resource has a specific error code, but when it gets received by parent dsc process, that simply becomes exit 2 DSC error. Would be good to have ability for resources to set the dsc exit code like JSON Parsing, invalid input, Assert, etc...

This can help higher level tools present information to the user.

Proposed technical implementation details (optional)

Resources currently return an error trace, maybe we can have an enum of error categories that is a property of the error JSON trace. Last one wins.

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

No files, tests, or entry points are named. Start by tracing how resource error traces reach the parent dsc process and become exit code 2; done means defining and implementing a consistent way for resource error categories, such as assertion or input errors, to determine the final dsc exit code.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, 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.