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

Make datadog-sync safe and deterministic for unattended automation (tracking)

クローズ
#707 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

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

調査の方向性

Start with the five-PR plan in this issue and read CONTRIBUTING for the required review scope. Begin with PR #708, covering exit codes, JSON error events, and SIGPIPE handling; completion means that concern is independently green while preserving the stated human-workflow and legacy-option compatibility commitments.

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

説明

enhancement

Overview of issue:

datadog-sync is increasingly run unattended: from CI jobs, schedulers, and AI agents. Today it is built for an operator at a terminal, and automation has to work around several gaps:

  • Ambiguous failures. Invalid option values and config-validation errors exit 1, the same code as a runtime failure. Ctrl-C and aborted prompts have no dedicated exit code. Piping output into head can end in a BrokenPipeError.
  • No reliable "done" signal. With --json, there is no single terminal event that says the invocation finished and how (status, counts, exit code), so a wrapper can't tell a finished run from a truncated one.
  • No way to constrain an invocation. A caller can't say "this must not write to Datadog" or "fail rather than prompt", so a mis-assembled command can mutate an org or hang waiting on stdin.
  • Awkward inputs. Resources, worker limits, and filters are only accepted as single combined strings, and boolean opt-outs need the --flag=False form.
  • No offline discovery. The only way to learn the option surface is to parse --help text.

Intent: make datadog-sync safe, deterministic, and discoverable for unattended automation while preserving existing human workflows, defaults, and legacy option forms.

Proposed change: a stack of five small PRs

To keep each review focused (one concern per PR, per CONTRIBUTING), the work is split into a stack. Each PR builds on the one before it and is independently green. All five will be opened as drafts for visibility. Review is requested one PR at a time, starting with PR 1.

# PR Adds
1 #708 Exit codes: 2 invalid usage, 130 interrupt, 1 runtime failure. Structured error events under --json. Default SIGPIPE handling on Unix.
2 #709 Exactly one terminal NDJSON summary event (status, counts, duration_ms, exit_code) per --json invocation.
3 #710 Root flags --read-only, --non-interactive, --yes, backed by a per-command capability registry.
4 #711 Repeatable --resource / --worker-limit, --no-<flag> negations, --filter-file (including stdin). Removes the now-empty CustomOptionClass.
5 #712 datadog-sync schema (offline JSON option schema), help grouped by category, completions for bash/zsh/fish, README "Scripting and agent integration" section.

PR links will be added here as they open.

Compatibility commitments

  • Defaults, human-readable output, and interactive prompts are unchanged unless the caller opts in (--json, --read-only, --non-interactive, --yes).
  • Legacy option forms keep working: --resources=a,b, --flag=False, and existing filter syntax. New forms merge with them and do not replace them.
  • Behavior never depends on detecting whether the caller is a human or an agent.
  • One intentional change: validation errors that previously exited 1 now exit 2 (click's standard usage-error code). Scripts that test for exactly 1 on a bad argument would see 2. Click's own parse errors (for example, an unknown option) already exit 2.

Out of scope

  • Changes to how any resource type is synced.
  • Integration-test or cassette changes.
  • The #501 wording fix (import reads the source org into local state), which ships separately in #713 against main.
主要言語
Python
スター
79
フォーク
26
平均マージ
21時間 8分
マージ済み PR(30日)
30

環境構築

はじめの一歩

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

DataDog/datadog-sync-cli のほかの issue

DataDog/datadog-sync-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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