-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Track usage of --v2-debug usage and final --v2-debug changes #9810
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: debug-migration
Are you sure you want to change the base?
Track usage of --v2-debug usage and final --v2-debug changes #9810
Conversation
…ependent false-negatives.
…onfigure cli_timestamp_format.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## debug-migration #9810 +/- ##
==================================================
Coverage ? 93.32%
==================================================
Files ? 209
Lines ? 16909
Branches ? 0
==================================================
Hits ? 15780
Misses ? 1129
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| "type": "enhancement", | ||
| "category": "Migration", | ||
| "description": "Implement a ``--migrate-v2`` flag that detects breaking changes for AWS CLI v2 for entered commands." | ||
| "description": "Implement a ``--v2-debug`` flag that detects breaking changes for AWS CLI v2 for entered commands." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the env var here too.
awscli/data/cli.json
Outdated
| }, | ||
| "no-v2-debug": { | ||
| "action": "store_true", | ||
| "dest": "no_v2_debug", | ||
| "help": "<p>Disable AWS CLI v2 migration assistance.</p>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for if you've set the environment variable, but want to opt-out for a single invocation?
If so, I don't think we need that at launch, can add it if folks ask for it. We have the slightly more verbose AWS_CLI_UPGRADE_DEBUG_MODE=false aws s3 ls as a workaround sooner.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that was the intended use, which is consistent with some other global args that have env vars, such as auto prompt mode and pager.
I'm not against removing it, will do this in next revision.
awscli/customizations/globalargs.py
Outdated
| out_file=sys.stderr | ||
| ) | ||
| if url_params and session.full_config.get('cli_follow_urlparam', True): | ||
| if url_params and session.get_scoped_config().get('cli_pager', None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this still be cli_follow_urlparam?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! The config we are checking should be updated to scoped config, but yes it should still be cli_follow_urlparam, looks like a copy-paste error.
Will revise.
awscli/customizations/globalargs.py
Outdated
| s3_config is not None and s3_config | ||
| .get( | ||
| 'us_east_1_regional_endpoint', | ||
| 'legacy' | ||
| ) == 'legacy' and region in ('us-east-1', None) | ||
| ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not seeing the warning printed for aws s3api list-directory-buckets --region us-east-1 --v2-debug with profile
[default]
region = us-east-1
cli_history=enabled
retry_mode=standard
output = json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Looks like I likely tested with high-level s3 commands for this particular breaking change, though it should apply to the modeled s3api commands too.
Will revise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I addressed this, and also added 2 regression tests to test this (for s3 and s3api).
|
An update is needed to detecting URL parameter usage (parameters starting with To avoid bloating this PR with new changes, I'll follow up with this change in a future PR. |
Description of changes:
cli_pagerconfig to the empty string.--v2-debugcommand line optioncli_timestamp_format.file://.Description of tests:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.