Skip to content

Conversation

@ywangd
Copy link
Member

@ywangd ywangd commented Feb 18, 2025

When a CopmleteMultipartUpload request fails after the initial 200 response, the status code of the failure response use to be not set and hence got translated to status code 0. With #116212, we handle this case accordingly. Since AWS SDK 1.12.691, the status code is now set to 200 instead of 0. This PR changes our error handling code accordingly.

Relates: #122431
Relates: #116212
Resolves: #122799

Relevant AWS SDK change
https://github.com/aws/aws-sdk-java/blame/430899c217f34fae63b35c77f4d9bfd361c9de77/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L3696-L3709

When a CopmleteMultipartUpload request fails after the initial 200
response, the status code of the failure response use to be not set and
hence got translated to status code 0. With elastic#116212, we handle this case
accordingly. Since AWS SDK 1.12.691, the status code is now set to 200
instead of 0. This PR changes our error handling code accordingly.

Relates: elastic#122431
Relates: elastic#116212

Relevant AWS SDK change
https://github.com/aws/aws-sdk-java/blame/430899c217f34fae63b35c77f4d9bfd361c9de77/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L3696-L3709
@ywangd ywangd added >non-issue :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs auto-backport Automatically create backport pull requests when merged v9.0.0 v8.19.0 v9.1.0 labels Feb 18, 2025
@ywangd ywangd requested a review from DaveCTurner February 18, 2025 06:56
@elasticsearchmachine elasticsearchmachine added the Team:Distributed Coordination Meta label for Distributed Coordination team label Feb 18, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

Thanks for investigating & fixing this @ywangd! One suggestion regarding the comment.

Copy link
Contributor

@DaveCTurner DaveCTurner left a comment

Choose a reason for hiding this comment

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

... but LGTM either way

…ries/s3/S3BlobContainer.java

Co-authored-by: David Turner <[email protected]>
@ywangd ywangd added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Feb 18, 2025
@elasticsearchmachine elasticsearchmachine merged commit 850249b into elastic:main Feb 18, 2025
17 checks passed
@ywangd ywangd deleted the es-122799-fix branch February 18, 2025 09:12
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.0 Commit could not be cherrypicked due to conflicts
8.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 122815

@ywangd
Copy link
Member Author

ywangd commented Feb 18, 2025

💚 All backports created successfully

Status Branch Result
8.x
9.0

Questions ?

Please refer to the Backport tool documentation

ywangd added a commit to ywangd/elasticsearch that referenced this pull request Feb 18, 2025
When a CopmleteMultipartUpload request fails after the initial 200
response, the status code of the failure response use to be not set and
hence got translated to status code 0. With elastic#116212, we handle this case
accordingly. Since AWS SDK 1.12.691, the status code is now set to 200
instead of 0. This PR changes our error handling code accordingly.

Relates: elastic#122431 Relates: elastic#116212 Resolves: elastic#122799

Relevant AWS SDK change
https://github.com/aws/aws-sdk-java/blame/430899c217f34fae63b35c77f4d9bfd361c9de77/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L3696-L3709

(cherry picked from commit 850249b)

# Conflicts:
#	muted-tests.yml
ywangd added a commit to ywangd/elasticsearch that referenced this pull request Feb 18, 2025
When a CopmleteMultipartUpload request fails after the initial 200
response, the status code of the failure response use to be not set and
hence got translated to status code 0. With elastic#116212, we handle this case
accordingly. Since AWS SDK 1.12.691, the status code is now set to 200
instead of 0. This PR changes our error handling code accordingly.

Relates: elastic#122431 Relates: elastic#116212 Resolves: elastic#122799

Relevant AWS SDK change
https://github.com/aws/aws-sdk-java/blame/430899c217f34fae63b35c77f4d9bfd361c9de77/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L3696-L3709

(cherry picked from commit 850249b)

# Conflicts:
#	muted-tests.yml
elasticsearchmachine pushed a commit that referenced this pull request Feb 18, 2025
* Handle status code 200 for s3 CMU response (#122815)

When a CopmleteMultipartUpload request fails after the initial 200
response, the status code of the failure response use to be not set and
hence got translated to status code 0. With #116212, we handle this case
accordingly. Since AWS SDK 1.12.691, the status code is now set to 200
instead of 0. This PR changes our error handling code accordingly.

Relates: #122431 Relates: #116212 Resolves: #122799

Relevant AWS SDK change
https://github.com/aws/aws-sdk-java/blame/430899c217f34fae63b35c77f4d9bfd361c9de77/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L3696-L3709

(cherry picked from commit 850249b)

# Conflicts:
#	muted-tests.yml

* unmute
elasticsearchmachine pushed a commit that referenced this pull request Feb 19, 2025
When a CopmleteMultipartUpload request fails after the initial 200
response, the status code of the failure response use to be not set and
hence got translated to status code 0. With #116212, we handle this case
accordingly. Since AWS SDK 1.12.691, the status code is now set to 200
instead of 0. This PR changes our error handling code accordingly.

Relates: #122431 Relates: #116212 Resolves: #122799

Relevant AWS SDK change
https://github.com/aws/aws-sdk-java/blame/430899c217f34fae63b35c77f4d9bfd361c9de77/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L3696-L3709

(cherry picked from commit 850249b)

# Conflicts:
#	muted-tests.yml

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport pending :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs >non-issue Team:Distributed Coordination Meta label for Distributed Coordination team v8.19.0 v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] S3RepositoryAnalysisRestIT testRepositoryAnalysis failing

3 participants