Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewerConcurrentVersions in LifecycleRuleNoncurrentVersionExpiration is ignored #3500

Closed
1 task
BreakingBread0 opened this issue Oct 4, 2024 · 3 comments
Closed
1 task
Labels
bug This issue is a bug. p1 This is a high priority issue queued s3

Comments

@BreakingBread0
Copy link

BreakingBread0 commented Oct 4, 2024

Describe the bug

When setting a lifecycle configuration with noncurrent version expiry, NewerConcurrentVersions seems to not be serialized into the request (see https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutLifecycleConfigurationRequestMarshaller.cs#L124)

This doesnt appear to be right, especially since there is no documentation describing this behaviour. Having a quick look around, the PutBucketLifecycleConfigurationRequestMarshaller for S3Control seems to do serialize it (https://github.com/aws/aws-sdk-net/blob/main/sdk/src/Services/S3Control/Generated/Model/Internal/MarshallTransformations/PutBucketLifecycleConfigurationRequestMarshaller.cs#L172)

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

NewerNoncurrentVersions being written into the request.

Current Behavior

The NewerNoncurrentVersions is ignored during serialization.

Reproduction Steps

This is my current code:

PutLifecycleConfigurationRequest request = new()
{
    BucketName = bucketName,
    Configuration = new()
    {
        Rules = new()
        {
            new Amazon.S3.Model.LifecycleRule() {
                NoncurrentVersionExpiration = new LifecycleRuleNoncurrentVersionExpiration()
                {
                    NewerNoncurrentVersions = keepItems,
                    //NoncurrentDays = keepDays,
                },
                AbortIncompleteMultipartUpload = new LifecycleRuleAbortIncompleteMultipartUpload()
                {
                    DaysAfterInitiation = 7
                },
                Expiration = new LifecycleRuleExpiration()
                {
                    //Am object which only has deletion markers
                    ExpiredObjectDeleteMarker = true,
                },
                Id = lifecycleConfigName,
                Status = LifecycleRuleStatus.Enabled,
                Filter = new()
            }
        }
    }
};

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.S3 3.7.404.1 (latest at time of writing)

Targeted .NET Platform

.NET 8

Operating System and version

Windows 10

@BreakingBread0 BreakingBread0 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 4, 2024
@bhoradc bhoradc added needs-reproduction This issue needs reproduction. p2 This is a standard priority issue s3 p1 This is a high priority issue queued and removed needs-triage This issue or PR still needs to be triaged. p2 This is a standard priority issue needs-reproduction This issue needs reproduction. labels Oct 4, 2024
@bhoradc
Copy link

bhoradc commented Oct 4, 2024

Hi @BreakingBread0,

Thank you for reporting the issue. We acknowledge the property NewerNoncurrentVersions is not sent on the request object. Our team will further investigate and work on the fix for it.

Regards,
Chaitanya

Copy link

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@muhammad-othman
Copy link
Member

Hello @BreakingBread0,
PutLifecycleConfigurationRequest.NewerNoncurrentVersions is serialized and sent to S3 as part of v3.7.404.7.
Feel free to reach out if you faced any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p1 This is a high priority issue queued s3
Projects
None yet
Development

No branches or pull requests

3 participants