Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
s3_bucket: fix VersionId==null when s3 object not versioned (#1538)
s3_bucket: fix VersionId==null when s3 object not versioned SUMMARY Boto3 1.26.129 (possibly earlier) returns "VersionId": "null" from s3_client.list_object_versions() when s3 objects are not versioned. Previously, "VersionId" was None when an s3 object was not versioned. This change broke s3_bucket.destroy_bucket() because the the VersionId was no longer popped (line 1166) when the s3 object was not versioned, and the subsequent attempts to delete the s3 object failed as the "VersionId" was absolutely not "null". Adding in `or fk.get("VersionId")=="null" will catch this new value for non-versioned s3 objects while allowing backwards compatibility with previous versions that return None for "VersionId". Fixes #1533 s3_bucket.destroy_bucket fails to delete unversioned items ISSUE TYPE Bugfix Pull Request COMPONENT NAME s3_bucket.py ADDITIONAL INFORMATION Ensure that there is an s3 bucket with objects in it name: Remove buckets s3_bucket: name: "my_bucket_with_objects_with_no_versioning" state: absent force: yes Reviewed-by: Mark Chappell
- Loading branch information