Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature: Enable use of semantic exit codes for adapted PSDSC resources

オープン
#1,380 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
powershell, rust
領域
devops, tooling

調査の方向性

lib/dsc-lib/src/dscresources/adapted_resource_manifest.rs と RFC0001/PR #1319 から始め、適応されたリソースが現在どのように終了コードを表現しているかを追跡します。セマンティックコードに対するクラスおよびマニフェストのコントラクトを定義し、0/1 のデフォルト動作を含め、リソース操作で特定の失敗コードを表面化できることを検証します。

索引モデルが issue の本文から書いたものです。

説明

Issue-Enhancement
Summary of the new feature / enhancement

As a resource author implementing DSC resources as PowerShell classes,
I want to be able to provide semantic exit codes for my users,
so that my resources can fit into the semantics of DSC more correctly.

Currently, adapted PSDSC resources always return an exit code of 1 for an operational failure. There is no way for a resource implemented as a PowerShell class to:

  1. Indicate a set of exit codes and their meaning for DSC from the class implementation.
  2. Indicate a set of exit codes and their meaning for DSC from the adapted resource manifest.
  3. Surface that the operation is a failure and should exit with a specific code from any given resource operation.

[!NOTE]
This problem affects other adapters as well, but we only have the PowerShell adapters published.

Proposed technical implementation details (optional)

We should add an exitCodes field to the adapted resource manifest to ensure that adapted resources can propagate semantically defined exit codes to DSC and higher order tools.

I can address the specifics of how to retrieve the exit codes from a class definition in RFC0001, but I think we need a way to properly indicate a semantic exit code from within a class method. I can't see an immediately obvious way to do this without either providing a [DscOperationException] class or requiring the resource author to implement a custom exception that includes both an exit code and message that their resource class throws.

When an adapted resource doesn't provide semantic exit codes, we should treat the exit codes the same way we do for other resources (0 for success, 1 for failure). This is an opt-in enhancement for all resources, but currently adapted resource authors can't participate in these semantics.

主要言語
Rust
スター
536
フォーク
76
平均マージ
2日 28分
マージ済み PR(30日)
17

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PowerShell/DSC のほかの issue

PowerShell/DSC の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。