Skip to content

chore: command docs needed for new API operations - #208

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
chore/command-docs-drift-20261109
Open

github-actions[bot] wants to merge 1 commit into
mainfrom
chore/command-docs-drift-20261109

Conversation

@github-actions

@github-actions github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

The production OpenAPI spec has operations without a curated command doc. Each
file below is a draft: true stub scaffolded from the spec (arguments,
same-group related commands, one schema-generated example). Drafts render no
examples in --help or on the Help Center, and the release gate blocks the
next tag until every one is curated
.

To finish a stub: rewrite the example(s) as real usage (2–4, common case
first, quote every command: value), fix the argument text, add notes only
where the CLI adds behavior, then remove draft: true. Validate with:

curl -sSL https://api.doit.com/openapi.yaml -o /tmp/openapi.yaml
DCI_COMMAND_DOCS_SPEC=/tmp/openapi.yaml go test -run TestCommandDocs .

New operations:

  • count-attribute-attribution-sets
  • create-customer-notification
  • create-customer-subscription
  • create-user-notification
  • delete-customer-notification
  • delete-customer-subscription
  • delete-user-notification
  • get-attribute-attribution-set
  • get-attribute-workload-details
  • get-attribute-workloads-cost-data-status
  • get-attribute-workloads-signals
  • get-customer-notification
  • get-customer-subscription
  • get-invoice-pdf
  • get-user-notification
  • list-attribute-attribution-set-versions
  • list-attribute-attribution-sets
  • list-attribute-workload-non-network-resource-types
  • list-attribute-workloads-cloud-providers
  • list-attribute-workloads-filter-values
  • list-attribute-workloads-resource-tag-keys
  • list-attribute-workloads-resource-tag-values
  • list-customer-notifications
  • list-customer-subscriptions
  • list-user-notifications
  • query-attribute-workload-resources-over-time
  • query-attribute-workload-resources-stats
  • query-attribute-workload-resources-table
  • query-attribute-workloads-over-time
  • query-attribute-workloads-stats
  • query-attribute-workloads-table
  • update-customer-notification
  • update-customer-subscription
  • update-user-notification

See COMMAND-DOCS-SPEC.md §3 for the file format.

@github-actions
github-actions Bot requested review from a team, apgiorgi, chaim0m and taltultc as code owners November 9, 2026 06:48
Comment on lines +7 to +20
dimension: "What one row (or one series) stands for:

- `workload`: one Kubernetes workload on one cluster. Only these rows carry `workloadId`,
the input of the `/attribute/v1/workloads/w/*` operations.
- `workloadName`: all workloads with the same name, across clusters.
- `workloadType`: one workload type.
- `namespace`: one Kubernetes namespace.
- `platform`: one cluster (name, type, region, account and cloud).
- `accountId`: one cloud account that hosts clusters.
- `resource`: one billed cloud resource used by workloads.
- `resourceType`: one billed service.
- `costDescription`: one billing SKU description.
- `platformCloudProvider`: one cloud that clusters run on."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Seven new stubs carry multi-line argument strings that are not Prettier-formatted, so omni's YAML lint fails once these files are synced. Their double-quoted strings continue at column 0, below the arguments: key's indentation. Prettier's parser rejects such lines as "Multi-line double-quoted string needs to be sufficiently indented", or at best re-indents them. Fix: collapse each description to one line, or indent its continuation lines past the key, then run prettier 3.9.6 on all 7 files. Same pattern at 7 sites (query-attribute-workloads-over-time.yaml:7, query-attribute-workloads-stats.yaml:7, query-attribute-workloads-table.yaml:7). [also at: command-docs/get-customer-notification.yaml:8 - After merging, the release sync will copy 7 YAML files into omni that do not pass omni's Prettier lint. Their multi-line double-quoted argument strings continue at column 0, below the arguments: key.]

Why this was flagged

tools/commanddocs/main.go:236 passes the spec's parameter description through yamlQuote (main.go:306-311). yamlQuote escapes only backslash and double quote, so newlines go into the file raw. The result is continuation lines at column 0 inside the arguments: map, for example query-attribute-workloads-over-time.yaml:8-20 and get-customer-notification.yaml:8. No existing command-docs file has a multi-line scalar; every base-branch file is single-line, so this layout is new. AGENTS.md requires these files to be Prettier-formatted (printWidth 120 in .prettierrc.json) because omni's CI lints them after the release sync copies them in. Prettier's yaml parser needs continuation lines of a double-quoted scalar to be indented deeper than the parent key, so it either fails to parse or rewrites the lines. Either way a prettier check fails. Go's yaml.v3, used by command_docs_test.go, is lenient here, so the in-repo test does not catch it. Curators remove draft: true but usually leave the argument text as it is, so the bad layout lasts past curation.

Verification: Severity: normal. The trigger is any run of the repo's own formatting check (.github/workflows/ci.yml:64-65) or omni's prettier lint after the sync. tools/commanddocs/main.go:236 writes yamlQuote(description), and yamlQuote (main.go:306-311) only escapes \ and ", so newlines land in the file as they are. Either way the CI step at ci.yml:65 fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants