Skip to content

HDDS-16006. Fix S3 PutBucketLifecycleConfiguration compatibility test failures - #10883

Open
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-16006
Open

HDDS-16006. Fix S3 PutBucketLifecycleConfiguration compatibility test failures#10883
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-16006

Conversation

@priyeshkaratha

Copy link
Copy Markdown
Member

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.

@priyeshkaratha
priyeshkaratha requested a review from ChenSammi July 28, 2026 04:11
@priyeshkaratha
priyeshkaratha marked this pull request as ready for review July 28, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant