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

backfill @required on ChangeMessageVisibilityBatchRequestEntry.VisibilityTimeout #2767

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

lucix-aws
Copy link
Contributor

@lucix-aws lucix-aws commented Aug 30, 2024

relates aws/aws-sdk#527
closes #2250

This is a stopgap to unblock customers affected by this issue. An upstream modeling fix still needs to be pursed with the SQS team.

Fix issue where SDK could not send a VisibilityTimeout of 0 in a ChangeMessageVisibilityBatchRequestEntry.

        &sqs.ChangeMessageVisibilityBatchInput{
            QueueUrl: aws.String("foo"),
            Entries: []types.ChangeMessageVisibilityBatchRequestEntry{
                {   
                    Id:            aws.String("bar"),
                    ReceiptHandle: aws.String("baz"),
                },  
            },  
        },

before

{"Entries":[{"Id":"bar","ReceiptHandle":"baz"}],"QueueUrl":"foo"}

after

{"Entries":[{"Id":"bar","ReceiptHandle":"baz","VisibilityTimeout":0}],"QueueUrl":"foo"}

@lucix-aws lucix-aws requested a review from a team as a code owner August 30, 2024 16:13
Copy link
Contributor

@Madrigal Madrigal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, should we add a unit test to verify when can we actually get rid of this if/when a fix is added upstream?

@lucix-aws lucix-aws merged commit da11d7e into main Aug 30, 2024
12 checks passed
@lucix-aws lucix-aws deleted the fix-requiredvisibilitytimeout branch August 30, 2024 17:18
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.

sqs.ChangeMessageVisibilityBatch fails when entries' VisibilityTimeout is zero
3 participants