Skip to content

Improve example validation and corrections#10266

Merged
ashovlin merged 3 commits into
aws:developfrom
ashovlin:v1-example-validation
May 20, 2026
Merged

Improve example validation and corrections#10266
ashovlin merged 3 commits into
aws:developfrom
ashovlin:v1-example-validation

Conversation

@ashovlin
Copy link
Copy Markdown
Member

Issue #, if available: Backport of #10101 to CLIv1

Description of changes:

This improves the validation we do in the existing tests/functional/docs/test_examples.py. Previously we were only testing the service and operation name.

Now, it runs the example commands through the appropriate parser for each. This will catch more issues: invalid syntax, invalid argument names, missing required parameters.

This also fixes the examples that fail for the updated test.

Note: I did not address examples that specify --cli-input-json/etc., it'll require more work to parse and validate those.

Note: The one file difference is application-autoscaling/put-scaling-policy - it was already correct in v1.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ashovlin ashovlin added the v1 label Apr 30, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.43%. Comparing base (c4681b5) to head (d4b8c11).
⚠️ Report is 357 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10266      +/-   ##
===========================================
+ Coverage    93.39%   93.43%   +0.04%     
===========================================
  Files          210      211       +1     
  Lines        17052    17283     +231     
===========================================
+ Hits         15925    16149     +224     
- Misses        1127     1134       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread awscli/examples/cognito-identity/delete-identities.rst Outdated
Comment thread awscli/examples/comprehend/create-document-classifier.rst Outdated
@ashovlin ashovlin force-pushed the v1-example-validation branch from 097d180 to d4b8c11 Compare May 18, 2026 19:36
@ashovlin
Copy link
Copy Markdown
Member Author

Rebased on develop via https://github.com/aws/aws-cli/compare/097d180e7d7951511ff3ab72bd61659a9d5cfaef..d4b8c11df4d26a78f87a90596902e1ba43dc1cc7, CI was failing due to the recent 3.9 drop.

@ashovlin ashovlin requested a review from kdaily May 18, 2026 19:37
@ashovlin ashovlin merged commit 162b8bf into aws:develop May 20, 2026
41 checks passed
@ashovlin ashovlin deleted the v1-example-validation branch May 20, 2026 17:26
aws-sdk-python-automation added a commit that referenced this pull request May 20, 2026
* release-1.45.12:
  Bumping version to 1.45.12
  Update changelog based on model updates
  Improve example validation and corrections (#10266)
  Validate CloudTrail log files don't have appended data (#10326)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants