Make datadog-sync safe and deterministic for unattended automation (tracking)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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 intoheadcan end in aBrokenPipeError. - 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=Falseform. - No offline discovery. The only way to learn the option surface is to parse
--helptext.
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
1now exit2(click's standard usage-error code). Scripts that test for exactly1on a bad argument would see2. Click's own parse errors (for example, an unknown option) already exit2.
Out of scope
- Changes to how any resource type is synced.
- Integration-test or cassette changes.
- The #501 wording fix (
importreads the source org into local state), which ships separately in #713 againstmain.
- Lenguaje dominante
- Python
- Estrellas
- 79
- Forks
- 26
- Merge medio
- 21 h 8 min
- PR fusionados (30 d)
- 30
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de DataDog/datadog-sync-cli
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
DataDog/datadog-sync-cli#698 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
CCM ResourcesAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
DataDog/datadog-sync-cli#697 ·
Los mantenedores suelen responder en 1 día
-
All security_monitoring_rules fail to sync: cases.condition is stripped from the create payloadAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
DataDog/datadog-sync-cli#598 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
DataDog/datadog-sync-cli#597 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
DataDog/datadog-sync-cli#353 ·
Los mantenedores suelen responder en 1 día
Todos los issues de DataDog/datadog-sync-cli
Issues similares
-
correction metadata
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
acl-org/acl-anthology#10104 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug status/needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
prowler-cloud/prowler#12885 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Bug in GaussianTailProbabilityCalibrator: running_statistics=False still uses a windowed varianceAbiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
selimfirat/pysad#107 ·
Los mantenedores suelen responder en 1 día
-
bug ci-failure high priority
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
vllm-project/vllm-omni#8194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día