priyeshkaratha opened a new pull request, #10883: URL: https://github.com/apache/ozone/pull/10883
## What changes were proposed in this pull request? PutBucketLifecycleConfiguration was rejecting three classes of valid S3 lifecycle configurations with HTTP 400, causing 5 failures in the S3 compatibility test suite: 1. **Past expiration dates** `OmLCExpiration.valid()` rejected any `Date` value earlier than the configuration's creation time. The S3 spec allows past dates; they mean objects should expire immediately and are commonly used in configuration templates. 2. **ExpiredObjectDeleteMarker** This S3 expiration element was not modeled in the JAXB classes. When present as the only expiration field, both days and date were null after parsing, causing `OmLCExpiration.valid()` to throw "Either 'days' or 'date' should be specified" → HTTP 400. 3. **NoncurrentVersionExpiration** This element was not parsed at all. Rules containing only `NoncurrentVersionExpiration` ended up with an empty actions list, failing the "At least one action" check → HTTP 400. ### Changes Made - **OmLCExpiration**: removed the "date must be in the future" check. ISO 8601 format and midnight-UTC constraints are retained. - **S3LifecycleConfiguration**: added `ExpiredObjectDeleteMarker` to the Expiration JAXB class and `NoncurrentVersionExpiration` to the Rule JAXB class. Rules whose only actions are unsupported elements are skipped when building the OmLifecycleConfiguration. If all rules in the request are unsupported-only, the gateway returns HTTP 200 without persisting (accept-but-ignore semantics matching AWS behavior). - **BucketCrudHandler**: handle the null return from toOmLifecycleConfiguration to skip setLifecycleConfiguration when there is nothing to persist. ## What is the link to the Apache JIRA HDDS-16006 ## How was this patch tested? Added new testcases for failed cases. -- 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]
