priyeshkaratha opened a new pull request, #12161:
URL: https://github.com/apache/ozone/pull/12161

   ## What changes were proposed in this pull request?
   AWS S3 returns an `x-amz-expiration` header on PutObject when the object 
matches an enabled lifecycle Expiration rule. Ozone S3 Gateway does not, which 
breaks S3 compatibility tests (e.g. Ceph s3-tests 
`test_lifecycle_expiration_header_*`) and clients that expect this header.
   
   This PR adds the header to the PutObject response:
   `x-amz-expiration: expiry-date="Fri, 27 Nov 2026 00:00:00 GMT", 
rule-id="rule1"`
   
   - Rules are matched by prefix, tag, or `And` filter. If several rules match, 
the earliest expiry wins.
   - For `Days` rules, the expiry date is rounded up to the next midnight UTC, 
as AWS S3 does.
   - If the lifecycle lookup fails, the header is omitted and the PUT still 
succeeds.
   
   The feature is off by default 
(`ozone.s3g.lifecycle.expiration.header.enabled=false`), because it needs an 
extra OM call for every PutObject.
   
   ## What is the link to the Apache JIRA
   
   HDDS-16152
   
   ## How was this patch tested?
   
   Tested using unit test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to