Repository navigation
chore: command docs needed for new API operations - #208
github-actions[bot] wants to merge 1 commit into
Conversation
| 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." | ||
|
|
There was a problem hiding this comment.
🔴 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.
The production OpenAPI spec has operations without a curated command doc. Each
file below is a
draft: truestub scaffolded from the spec (arguments,same-group related commands, one schema-generated example). Drafts render no
examples in
--helpor on the Help Center, and the release gate blocks thenext 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 onlywhere the CLI adds behavior, then remove
draft: true. Validate with:New operations:
count-attribute-attribution-setscreate-customer-notificationcreate-customer-subscriptioncreate-user-notificationdelete-customer-notificationdelete-customer-subscriptiondelete-user-notificationget-attribute-attribution-setget-attribute-workload-detailsget-attribute-workloads-cost-data-statusget-attribute-workloads-signalsget-customer-notificationget-customer-subscriptionget-invoice-pdfget-user-notificationlist-attribute-attribution-set-versionslist-attribute-attribution-setslist-attribute-workload-non-network-resource-typeslist-attribute-workloads-cloud-providerslist-attribute-workloads-filter-valueslist-attribute-workloads-resource-tag-keyslist-attribute-workloads-resource-tag-valueslist-customer-notificationslist-customer-subscriptionslist-user-notificationsquery-attribute-workload-resources-over-timequery-attribute-workload-resources-statsquery-attribute-workload-resources-tablequery-attribute-workloads-over-timequery-attribute-workloads-statsquery-attribute-workloads-tableupdate-customer-notificationupdate-customer-subscriptionupdate-user-notificationSee COMMAND-DOCS-SPEC.md §3 for the file format.