Skip to content

Conversation

@aemous
Copy link
Contributor

@aemous aemous commented Oct 21, 2025

Description of changes:

Description of tests:

  • Wrote and passed unit tests asserting expected behavior of the primary components and interfaces.
  • Thoroughly tested the tool manually and verified expected behavior.

Example output:

$ upgrade-aws-cli --script examples/upload_s3_files.sh -i --output upload_s3_files_v2.sh

[1/2] binary-params-base64
In AWS CLI v2, an input parameter typed as binary large object (BLOB) expects the input to be base64-encoded. To retain v1 behavior after upgrading to AWS CLI v2, add `--cli-binary-format raw-in-base64-out`.

@@ -1,8 +1,8 @@
#!/bin/bash
# Example script with AWS CLI v1 patterns

-aws secretsmanager put-secret-value --secret-id secret1213 \
-  --secret-binary file://data.json
+aws secretsmanager put-secret-value --secret-id secret1213 \
+  --secret-binary file://data.json --cli-binary-format raw-in-base64-out                                                                                                                                        

if
 aws kinesis put-record --stream-name samplestream --data file://data --partition-key samplepartitionkey ; then

Apply this fix? [y]es, [n]o, [u]pdate all, [q]uit: y

[2/2] binary-params-base64
In AWS CLI v2, an input parameter typed as binary large object (BLOB) expects the input to be base64-encoded. To retain v1 behavior after upgrading to AWS CLI v2, add `--cli-binary-format raw-in-base64-out`.

@@ -5,7 +5,7 @@
  --secret-binary file://data.json

if
- aws kinesis put-record --stream-name samplestream --data file://data --partition-key samplepartitionkey ; then
+ aws kinesis put-record --stream-name samplestream --data file://data --partition-key samplepartitionkey --cli-binary-format raw-in-base64-out ; then
    echo "command succeeded."
fi


Apply this fix? [y]es, [n]o, [u]pdate all, [q]uit: y
Fixed script written to: upload_s3_files_v2.sh

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

@aemous aemous requested a review from a team October 21, 2025 15:51
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (upgrade-linting-tool@1ef329d). Learn more about missing BASE report.

Additional details and impacted files
@@                   Coverage Diff                   @@
##             upgrade-linting-tool    #9803   +/-   ##
=======================================================
  Coverage                        ?   93.33%           
=======================================================
  Files                           ?      209           
  Lines                           ?    16807           
  Branches                        ?        0           
=======================================================
  Hits                            ?    15687           
  Misses                          ?     1120           
  Partials                        ?        0           

☔ 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.

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