Skip to content

Validate wait sub-commands and unknown options in example commands - #10826

Open
luigi617 wants to merge 1 commit into
v2from
code-example-ci-10
Open

luigi617 wants to merge 1 commit into
v2from
code-example-ci-10

Conversation

@luigi617

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:
Validate wait sub-commands and unknown options in example commands and fix existing violations

CommandValidator stopped at the operation and ignored leftover arguments, so aws ec2 wait no-such-waiter and unknown options such as --bogus-flag passed.

  • CommandValidator in tests/functional/docs/test_examples.py now follows sub-commands as the CLI does, so waiter names and waiter arguments are checked
  • Leftover arguments are reported as unknown options, and wait with no waiter name is reported
  • --cli-input-* is handled for waiters too, Windows ^ and ` continuations are parsed, and blocks with several commands are split
  • Fixed 36 example files, e.g. wrong option names, options the operation doesn't have, a wrong command in iot/add-thing-to-billing-group.rst, and placeholders in healthlake
  • Moved the task example from ecs/wait/services-stable.rst into a new ecs/wait/tasks-running.rst

Testing

  • Run pytest tests/functional/docs/test_examples.py -n auto
    === 64319 passed in 27.37s =====
    By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@luigi617
luigi617 requested a review from a team as a code owner October 30, 2026 16:37
@luigi617
luigi617 added this pull request to stack #10828 October 30, 2026 17:09

This branch has not been deployed

No deployments
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.

2 participants