Skip to content

Run CLI example commands to validate parameter values and fix existing violations - #10832

Open
luigi617 wants to merge 3 commits into
code-example-ci-12from
code-example-ci-13
Open

luigi617 wants to merge 3 commits into
code-example-ci-12from
code-example-ci-13

Conversation

@luigi617

@luigi617 luigi617 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:
Run CLI example commands to validate parameter values and fix existing violations

The example command check only parses commands, so invalid parameter values passed.

  • Added test_example_commands_run to tests/functional/docs/test_examples.py: each API operation and waiter command runs through the CLI driver with fake credentials and stops at before-call, after botocore has validated the parameters, so nothing is sent to AWS
  • Each example's Contents of files are written to a temporary directory for its file:// and fileb:// references
  • Errors that depend on the local machine, such as a file the example doesn't show, are skipped; custom commands and Windows examples still only go through the parse-only check
  • Fixed 108 example files, e.g. \ inside quoted JSON, values below the model's minimum length, raw text for blob parameters (now base64 or fileb://), invalid --cli-input-json files, Windows paths in Linux examples
  • Exceptions in example_style_exceptions.json: agent-toolkit examples, since the service is only available in us-east-1

Testing

  • Run pytest tests/functional/docs/test_examples.py -n auto
    === 76003 passed in 52.09s =====
    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 added this pull request to stack #10833 October 30, 2026 21:24
@luigi617
luigi617 requested a review from a team as a code owner October 30, 2026 21:24
@luigi617 luigi617 changed the title Code example ci 13 Run CLI example commands to validate parameter values and fix existing violations Oct 30, 2026

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