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

Fix an issue that causes the restoreStatus in listing response always be empty for glacier objects #24947

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import software.amazon.awssdk.services.s3.model.GetObjectRequest;
import software.amazon.awssdk.services.s3.model.ListObjectsV2Request;
import software.amazon.awssdk.services.s3.model.ObjectIdentifier;
import software.amazon.awssdk.services.s3.model.OptionalObjectAttributes;
import software.amazon.awssdk.services.s3.model.RequestPayer;
import software.amazon.awssdk.services.s3.model.S3Error;
import software.amazon.awssdk.services.s3.model.S3Object;
Expand Down Expand Up @@ -242,6 +243,8 @@ private FileIterator listObjects(Location location, boolean includeDirectoryObje

ListObjectsV2Request request = ListObjectsV2Request.builder()
.overrideConfiguration(context::applyCredentialProviderOverride)
// Restore status will not be added to the response without requested
.optionalObjectAttributes(OptionalObjectAttributes.RESTORE_STATUS)
.requestPayer(requestPayer)
.bucket(s3Location.bucket())
.prefix(key)
Expand Down