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

chore(main): release 2.46.0 #2832

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
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
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [2.46.0](https://github.com/googleapis/java-storage/compare/v2.45.0...v2.46.0) (2024-12-13)


### Features

* Introduce `java.time` methods and variables ([#2826](https://github.com/googleapis/java-storage/issues/2826)) ([baf30ee](https://github.com/googleapis/java-storage/commit/baf30ee91febbcda7d0f64b0083b789c4384a3c0))


### Bug Fixes

* Update retry lifecycle when attempting to decompress a gzip object ([#2840](https://github.com/googleapis/java-storage/issues/2840)) ([7dba13c](https://github.com/googleapis/java-storage/commit/7dba13cbbfd38d3c2147b25264934f33c5dc78e3))


### Dependencies

* Update dependency com.google.apis:google-api-services-storage to v1-rev20241113-2.0.0 ([#2823](https://github.com/googleapis/java-storage/issues/2823)) ([503e518](https://github.com/googleapis/java-storage/commit/503e518550b67870c3e856957fdadbc012eff1ed))
* Update dependency com.google.apis:google-api-services-storage to v1-rev20241206-2.0.0 ([#2839](https://github.com/googleapis/java-storage/issues/2839)) ([8f3cdd3](https://github.com/googleapis/java-storage/commit/8f3cdd39dbbbbd63c560c3cb44d1032c0bd41749))
* Update gcr.io/cloud-devrel-public-resources/storage-testbench docker tag to v0.50.0 ([#2825](https://github.com/googleapis/java-storage/issues/2825)) ([9aa68a6](https://github.com/googleapis/java-storage/commit/9aa68a67d931b19175e23f883a109f22b99411ca))
* Update sdk-platform-java dependencies ([#2841](https://github.com/googleapis/java-storage/issues/2841)) ([2a70481](https://github.com/googleapis/java-storage/commit/2a704815ee60b8ec7ff2c1af557fee4366ea2e19))


### Documentation

* Add samples for soft delete (objects) ([#2754](https://github.com/googleapis/java-storage/issues/2754)) ([41bc807](https://github.com/googleapis/java-storage/commit/41bc807e94f1c0eebd41b4a7baa12301858cc16f))

## [2.45.0](https://github.com/googleapis/java-storage/compare/v2.44.1...v2.45.0) (2024-11-18)


Expand Down
12 changes: 9 additions & 3 deletions README.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions gapic-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<name>gapic-google-cloud-storage-v2</name>
<description>GRPC library for gapic-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
Expand Down
16 changes: 8 additions & 8 deletions google-cloud-storage-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-bom</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<packaging>pom</packaging>
<parent>
<groupId>com.google.cloud</groupId>
Expand Down Expand Up @@ -69,37 +69,37 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:gapic-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage-control:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-control-v2</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
<version>2.46.0</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-control-v2</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
<version>2.46.0</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
</dependency>
</dependencies>
</dependencyManagement>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-storage-control/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<name>google-cloud-storage-control</name>
<description>GRPC library for google-cloud-storage-control</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions google-cloud-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>google-cloud-storage</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<packaging>jar</packaging>
<name>Google Cloud Storage</name>
<url>https://github.com/googleapis/java-storage</url>
Expand All @@ -12,7 +12,7 @@
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<properties>
<site.installationModule>google-cloud-storage</site.installationModule>
Expand Down
4 changes: 2 additions & 2 deletions grpc-google-cloud-storage-control-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-control-v2</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
<version>2.46.0</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
<name>grpc-google-cloud-storage-control-v2</name>
<description>GRPC library for google-cloud-storage</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions grpc-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<name>grpc-google-cloud-storage-v2</name>
<description>GRPC library for grpc-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
Expand Down
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<packaging>pom</packaging>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<name>Storage Parent</name>
<url>https://github.com/googleapis/java-storage</url>
<description>
Expand Down Expand Up @@ -123,7 +123,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
Expand All @@ -145,32 +145,32 @@
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>gapic-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:grpc-google-cloud-storage-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>grpc-google-cloud-storage-control-v2</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
<version>2.46.0</version><!-- {x-version-update:grpc-google-cloud-storage-control-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-control-v2</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
<version>2.46.0</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage-control:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
Expand Down
4 changes: 2 additions & 2 deletions proto-google-cloud-storage-control-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-control-v2</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
<version>2.46.0</version><!-- {x-version-update:proto-google-cloud-storage-control-v2:current} -->
<name>proto-google-cloud-storage-control-v2</name>
<description>Proto library for proto-google-cloud-storage-control-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions proto-google-cloud-storage-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-cloud-storage-v2</artifactId>
<version>2.45.1-beta-SNAPSHOT</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<version>2.46.0-beta</version><!-- {x-version-update:proto-google-cloud-storage-v2:current} -->
<name>proto-google-cloud-storage-v2</name>
<description>PROTO library for proto-google-cloud-storage-v2</description>
<parent>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-parent</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</parent>
<dependencies>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions samples/snapshot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage-control</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage-control:current} -->
<scope>compile</scope>
</dependency>

Expand Down Expand Up @@ -64,7 +64,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>2.45.1-SNAPSHOT</version><!-- {x-version-update:google-cloud-storage:current} -->
<version>2.46.0</version><!-- {x-version-update:google-cloud-storage:current} -->
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public static void main(String[] args) {
static void deleteBlob(String bucketName, String blobName) {
// Customize retry behavior
RetrySettings retrySettings =
StorageOptions.getDefaultRetrySettings().toBuilder()
StorageOptions.getDefaultRetrySettings()
.toBuilder()
// Set the max number of attempts to 10 (initial attempt plus 9 retries)
.setMaxAttempts(10)
// Set the backoff multiplier to 3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public static void disableRequesterPays(String projectId, String bucketName) {

Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();
Bucket bucket = storage.get(bucketName, Storage.BucketGetOption.userProject(projectId));
bucket.toBuilder()
bucket
.toBuilder()
.setRequesterPays(false)
.build()
.update(Storage.BucketTargetOption.userProject(projectId));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public static void disableSoftDelete(String projectId, String bucketName) {

Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();
Bucket bucket = storage.get(bucketName);
bucket.toBuilder()
bucket
.toBuilder()
.setSoftDeletePolicy(
// Setting the retention duration to 0 disables Soft Delete.
BucketInfo.SoftDeletePolicy.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public static void enableLifecycleManagement(String projectId, String bucketName
// See the LifecycleRule documentation for additional info on what you can do with lifecycle
// management rules. This one deletes objects that are over 100 days old.
// https://googleapis.dev/java/google-cloud-clients/latest/com/google/cloud/storage/BucketInfo.LifecycleRule.html
bucket.toBuilder()
bucket
.toBuilder()
.setLifecycleRules(
ImmutableList.of(
new LifecycleRule(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public static void enableUniformBucketLevelAccess(String projectId, String bucke
BucketInfo.IamConfiguration.newBuilder().setIsUniformBucketLevelAccessEnabled(true).build();

storage.update(
bucket.toBuilder()
bucket
.toBuilder()
.setIamConfiguration(iamConfiguration)
.setAcl(null)
.setDefaultAcl(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ public static void makeBucketPublic(String projectId, String bucketName) {
Policy originalPolicy = storage.getIamPolicy(bucketName);
storage.setIamPolicy(
bucketName,
originalPolicy.toBuilder()
originalPolicy
.toBuilder()
.addIdentity(StorageRoles.objectViewer(), Identity.allUsers()) // All users can view
.build());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public static void setBucketAutoclass(
Bucket bucket = storage.get(bucketName);

Bucket toUpdate =
bucket.toBuilder()
bucket
.toBuilder()
.setAutoclass(
Autoclass.newBuilder()
.setEnabled(enabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public static void setPublicAccessPreventionEnforced(String projectId, String bu
Bucket bucket = storage.get(bucketName);

// Enforces public access prevention for the bucket
bucket.toBuilder()
bucket
.toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.ENFORCED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public static void setPublicAccessPreventionInherited(String projectId, String b
Bucket bucket = storage.get(bucketName);

// Sets public access prevention to 'inherited' for the bucket
bucket.toBuilder()
bucket
.toBuilder()
.setIamConfiguration(
BucketInfo.IamConfiguration.newBuilder()
.setPublicAccessPrevention(BucketInfo.PublicAccessPrevention.INHERITED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public static void setRetentionPolicy(
Bucket bucket = storage.get(bucketName);
Bucket bucketWithRetentionPolicy =
storage.update(
bucket.toBuilder()
bucket
.toBuilder()
.setRetentionPeriodDuration(Duration.ofSeconds(retentionPeriodSeconds))
.build(),
BucketTargetOption.metagenerationMatch());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public static void setSoftDeletePolicy(String projectId, String bucketName) {

Storage storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();
Bucket bucket = storage.get(bucketName);
bucket.toBuilder()
bucket
.toBuilder()
.setSoftDeletePolicy(
BucketInfo.SoftDeletePolicy.newBuilder()
.setRetentionDuration(Duration.ofDays(10))
Expand Down
Loading
Loading