Distinguish expected script failures from unexpected errors

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

Start by comparing the script execution paths with NetBox's netbox/netbox/jobs.py and its existing Job statuses and handling. Done means AbortScript produces Failed, unhandled exceptions produce Errored, diagnostics and log sanitization remain useful, rollback behavior is documented, and log_failure() retains its logging-only semantics.

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

説明

app: scripts complexity: medium status: backlog type: feature
Plugin Version

v0.0.1

Proposed functionality

Use the final Job status to distinguish success, an intentional refusal, and an unexpected error. AbortScript should result in Failed, while an unhandled exception should result in Errored. Both currently produce a failed Job.

Apply this consistently across execution paths, preserve useful diagnostics and log sanitization, and document the rollback behavior.

Keep log_failure() as a logging operation unless a separate compatibility decision changes it. This status change should not give logging calls new transaction semantics.

Use case

A deployment script may correctly stop because a prerequisite is missing. Operators and automation need to distinguish that outcome from a programming error without reading the entire log.

Related request: netbox-community/netbox#22951.

External dependencies

Reuse the existing statuses and handling in NetBox's Job runner. No new package or service is expected.

主要言語
Python
スター
8
フォーク
0
平均マージ
9時間 34分
マージ済み PR(30日)
32

環境構築

はじめの一歩

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

netbox-community/netbox-scripts のほかの issue

netbox-community/netbox-scripts の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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