Skip to content

Commit

Permalink
s3_object - Deprecate support for removing leading / from object names (
Browse files Browse the repository at this point in the history
#1555)

s3_object - deprecate leading slash in object keys

SUMMARY
Deprecate support for removing leading / from object names
AWS APIs don't expect it to be there, pruning it may cause pain in future
ISSUE TYPE

Feature Pull Request

COMPONENT NAME
s3_object
ADDITIONAL INFORMATION
Deprecation was split from #1549

Reviewed-by: Alina Buzachis
(cherry picked from commit b9d5b48)
  • Loading branch information
tremble authored and patchback[bot] committed May 17, 2023
1 parent a71c207 commit fa6bd3c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deprecated_features:
- s3_object - support for passing object keys with a leading ``/`` has been deprecated and will be removed in a release after 2025-12-01 (https://github.com/ansible-collections/amazon.aws/pull/1549).
14 changes: 7 additions & 7 deletions plugins/modules/s3_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@
- Object key names should not include the leading C(/), see
U(https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html) for more
information.
# - Support for passing the leading C(/) has been deprecated and will be removed
# in a release after 2025-12-01.
- Support for passing the leading C(/) has been deprecated and will be removed
in a release after 2025-12-01.
type: str
sig_v4:
description:
Expand Down Expand Up @@ -1379,11 +1379,11 @@ def populate_params(module):
if obj.startswith("/"):
obj = obj[1:]
variable_dict["object"] = obj
# module.deprecate(
# "Support for passing object key names with a leading '/' has been deprecated.",
# date="2025-12-01",
# collection_name="amazon.aws",
# )
module.deprecate(
"Support for passing object key names with a leading '/' has been deprecated.",
date="2025-12-01",
collection_name="amazon.aws",
)

variable_dict["validate"] = not variable_dict["ignore_nonexistent_bucket"]
variable_dict["acl_disabled"] = False
Expand Down

0 comments on commit fa6bd3c

Please sign in to comment.