Skip to content

Commit

Permalink
deps: update gcr.io/cloud-devrel-public-resources/storage-testbench d…
Browse files Browse the repository at this point in the history
…ocker tag to v0.36.0 (#2080)

* chore: update HttpStorageRpc to avoid content-encoding: gzip on an empty request body


Co-authored-by: BenWhitehead <[email protected]>
  • Loading branch information
renovate-bot and BenWhitehead authored Jun 22, 2023
1 parent 5f916fb commit ba5c11a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ private RewriteResponse rewrite(RewriteRequest req, String token) {

Long maxBytesRewrittenPerCall =
req.megabytesRewrittenPerCall != null ? req.megabytesRewrittenPerCall * MEGABYTE : null;
StorageObject content = req.overrideInfo ? req.target : null;
Storage.Objects.Rewrite rewrite =
storage
.objects()
Expand All @@ -1111,7 +1112,7 @@ private RewriteResponse rewrite(RewriteRequest req, String token) {
req.source.getName(),
req.target.getBucket(),
req.target.getName(),
req.overrideInfo ? req.target : null)
content)
.setSourceGeneration(req.source.getGeneration())
.setRewriteToken(token)
.setMaxBytesRewrittenPerCall(maxBytesRewrittenPerCall)
Expand All @@ -1132,6 +1133,7 @@ private RewriteResponse rewrite(RewriteRequest req, String token) {
.setDestinationPredefinedAcl(Option.PREDEFINED_ACL.getString(req.targetOptions))
.setUserProject(userProject)
.setDestinationKmsKeyName(Option.KMS_KEY_NAME.getString(req.targetOptions));
rewrite.setDisableGZipContent(content == null);
HttpHeaders requestHeaders = rewrite.getRequestHeaders();
setEncryptionHeaders(requestHeaders, SOURCE_ENCRYPTION_KEY_PREFIX, req.sourceOptions);
setEncryptionHeaders(requestHeaders, ENCRYPTION_KEY_PREFIX, req.targetOptions);
Expand Down Expand Up @@ -1460,6 +1462,7 @@ public HmacKey createHmacKey(String serviceAccountEmail, Map<Option, ?> options)
.hmacKeys()
.create(projectId, serviceAccountEmail)
.setUserProject(Option.USER_PROJECT.getString(options))
.setDisableGZipContent(true)
.execute();
} catch (IOException ex) {
span.setStatus(Status.UNKNOWN.withDescription(ex.getMessage()));
Expand Down Expand Up @@ -1714,6 +1717,7 @@ public Bucket lockRetentionPolicy(Bucket bucket, Map<Option, ?> options) {
.buckets()
.lockRetentionPolicy(bucket.getName(), Option.IF_METAGENERATION_MATCH.getLong(options))
.setUserProject(Option.USER_PROJECT.getString(options))
.setDisableGZipContent(true)
.execute();
} catch (IOException ex) {
span.setStatus(Status.UNKNOWN.withDescription(ex.getMessage()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
@RunWith(StorageITRunner.class)
@CrossRun(
backends = {Backend.TEST_BENCH},
transports = {Transport.HTTP, Transport.GRPC})
transports = {Transport.GRPC})
public final class ITGrpcTest {

@Inject public Storage storage;
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM gcr.io/cloud-devrel-public-resources/storage-testbench:v0.35.0
FROM gcr.io/cloud-devrel-public-resources/storage-testbench:v0.36.0

0 comments on commit ba5c11a

Please sign in to comment.