You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a bucket has no initial contents, this resource fails with the error:
jq: error (at <stdin>:1): Cannot iterate over null (null)
This is because in this scenario, aws s3api list-objects --query 'Contents[].{LastModified: LastModified}' returns null, and max_by(.LastModified) is not a valid jq query.
Acceptance Criteria
The check for an empty bucket should return an empty list of versions, rather than returning an error.
The text was updated successfully, but these errors were encountered:
- Avoid calling jq more than once per operation. To do this, we have `jq` generate assignments with eval-safe escaping setting shell variables.
- Avoid passing anything but options through eval (keeping options themselves from being eval'd will be a compatibility-breaking change, and is the subject of cloud-gov#50).
- Avoid using `echo` to handle non-constant data (which introduces substantial portability problems across different implementations of `sh`; see https://unix.stackexchange.com/a/65819/3113 and https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html).
- Handle "null" return value from `aws s3api list-objects` gratefully (cloud-gov#49)
- Avoid calling jq more than once per operation. To do this, we have `jq` generate assignments with eval-safe escaping setting shell variables.
- Avoid passing anything but options through eval (keeping options themselves from being eval'd will be a compatibility-breaking change, and is the subject of cloud-gov#50).
- Avoid using `echo` to handle non-constant data (which introduces substantial portability problems across different implementations of `sh`; see https://unix.stackexchange.com/a/65819/3113 and https://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html).
- Handle "null" return value from `aws s3api list-objects` gratefully (cloud-gov#49)
When a bucket has no initial contents, this resource fails with the error:
This is because in this scenario,
aws s3api list-objects --query 'Contents[].{LastModified: LastModified}'
returnsnull
, andmax_by(.LastModified)
is not a valid jq query.Acceptance Criteria
The text was updated successfully, but these errors were encountered: