[Documentation] Add enum values to s3 checksum help text#10107
[Documentation] Add enum values to s3 checksum help text#10107adev-code wants to merge 1 commit intoaws:developfrom
Conversation
The help text for --checksum-mode and --checksum-algorithm did not document accepted enum values, making it unclear what options are available without consulting external docs. Update --checksum-mode to state ENABLED is the only valid value. Update --checksum-algorithm to list valid values (CRC64NVME, CRC32, SHA256, SHA1, CRC32C) and note the default. Fixes aws#10025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #10107 +/- ##
===========================================
+ Coverage 93.39% 93.40% +0.01%
===========================================
Files 210 210
Lines 17052 17139 +87
===========================================
+ Hits 15925 16009 +84
- Misses 1127 1130 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| 'help_text': ( | ||
| 'Indicates the algorithm used to create the checksum for the object. ' | ||
| 'Valid values are: CRC64NVME | CRC32 | SHA256 | SHA1 | CRC32C. ' | ||
| 'Defaults to \'CRC64NVME\'.' |
There was a problem hiding this comment.
This isn't correct for CLIv1, it uses CRC32 since CRT isn't guaranteed to be present.
There was a problem hiding this comment.
Oh ok thanks Alex. I got the information from AWS CLI S3 FAQ, it mentions info for v2:
By default, the Cyclic Redundancy Check 64 (CRC64NVME)
- Same info is said from S3 User Guide: Checking object integrity in Amazon S3 but does not specify v1 or v2.
The CRC64NVME checksum algorithm is the default checksum algorithm used for checksum calculations.
Both of those docs does not mention v1 anywhere, I wonder if this v1 information should also be documented in the user guide and in our FAQ?
There was a problem hiding this comment.
Looks like info is in V1 doc: https://docs.aws.amazon.com/cli/v1/topic/s3-faq.html#cli-aws-help-s3-faq
*By default, the Cyclic Redundancy Check 32 (CRC32) algorithm is used to calculate checksums, *
The help text for
--checksum-modeand--checksum-algorithminaws s3 cp(and other s3 subcommands) did not document the acceptedenum values.
Changes
--checksum-mode: Added thatENABLEDis the only valid value.--checksum-algorithm: Added valid values(
CRC64NVME | CRC32 | SHA256 | SHA1 | CRC32C) and default (CRC64NVME).Testing
Fixes #10025