Skip to content

Commit

Permalink
Merge branch 'main' into bigtable-string-type
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangpham95 authored Jun 19, 2024
2 parents 059380d + d8bd2c1 commit 8e0b838
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest-individual.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"firestore": "1.15.0",
"logging": "1.10.0",
"profiler": "0.4.0",
"pubsub": "1.38.0",
"pubsub": "1.39.0",
"pubsublite": "1.8.2",
"spanner": "1.63.0",
"storage": "1.42.0",
Expand Down
15 changes: 15 additions & 0 deletions pubsub/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changes

## [1.39.0](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.38.0...pubsub/v1.39.0) (2024-06-18)


### Features

* **pubsub/pstest:** Add support to register other servers into grpc.Server ([#9722](https://github.com/googleapis/google-cloud-go/issues/9722)) ([db8216e](https://github.com/googleapis/google-cloud-go/commit/db8216e54c8d9d23dd90bc47a081eb2754f7c92a))
* **pubsub:** Add service_account_email for export subscriptions ([92dc381](https://github.com/googleapis/google-cloud-go/commit/92dc381da281197567a2c9eb8dc941292000a3da))
* **pubsub:** Batch receipt modacks ([#10234](https://github.com/googleapis/google-cloud-go/issues/10234)) ([4c2cd10](https://github.com/googleapis/google-cloud-go/commit/4c2cd10fb73b7167c15d6dc24162ad0dac01ce8e))
* **pubsub:** Make lease management RPCs concurrent ([#10238](https://github.com/googleapis/google-cloud-go/issues/10238)) ([426a8c2](https://github.com/googleapis/google-cloud-go/commit/426a8c27a9d11f24e8c331b6375f87d29829e021))


### Bug Fixes

* **pubsub:** Closes [#10094](https://github.com/googleapis/google-cloud-go/issues/10094) - memory leak in pubsub receive ([#10153](https://github.com/googleapis/google-cloud-go/issues/10153)) ([66581c4](https://github.com/googleapis/google-cloud-go/commit/66581c44f2309984475fe5053fa11707f6f93b8d))

## [1.38.0](https://github.com/googleapis/google-cloud-go/compare/pubsub/v1.37.0...pubsub/v1.38.0) (2024-05-06)


Expand Down
2 changes: 1 addition & 1 deletion pubsub/internal/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
package internal

// Version is the current tagged release of the library.
const Version = "1.38.0"
const Version = "1.39.0"
2 changes: 1 addition & 1 deletion spanner/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module cloud.google.com/go/spanner
go 1.20

require (
cloud.google.com/go v0.115.0
cloud.google.com/go v0.114.0
cloud.google.com/go/iam v1.1.8
cloud.google.com/go/longrunning v0.5.7
github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0
Expand Down
4 changes: 2 additions & 2 deletions spanner/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRY
cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM=
cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I=
cloud.google.com/go v0.110.0/go.mod h1:SJnCLqQ0FCFGSZMUNUf84MV3Aia54kn7pi8st7tMzaY=
cloud.google.com/go v0.115.0 h1:CnFSK6Xo3lDYRoBKEcAtia6VSC837/ZkJuRduSFnr14=
cloud.google.com/go v0.115.0/go.mod h1:8jIM5vVgoAEoiVxQ/O4BFTfHqulPZgs/ufEzMcFMdWU=
cloud.google.com/go v0.114.0 h1:OIPFAdfrFDFO2ve2U7r/H5SwSbBzEdrBdE7xkgwc+kY=
cloud.google.com/go v0.114.0/go.mod h1:ZV9La5YYxctro1HTPug5lXH/GefROyW8PPD4T8n9J8E=
cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4=
cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw=
cloud.google.com/go/accessapproval v1.6.0/go.mod h1:R0EiYnwV5fsRFiKZkPHr6mwyk2wxUJ30nL4j2pcFY2E=
Expand Down
3 changes: 3 additions & 0 deletions storage/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -2123,8 +2123,11 @@ func (p *SoftDeletePolicy) toRawSoftDeletePolicy() *raw.BucketSoftDeletePolicy {
return nil
}
// Excluding read only field EffectiveTime.
// ForceSendFields must be set to send a zero value for RetentionDuration and disable
// soft delete.
return &raw.BucketSoftDeletePolicy{
RetentionDurationSeconds: int64(p.RetentionDuration.Seconds()),
ForceSendFields: []string{"RetentionDurationSeconds"},
}
}

Expand Down
4 changes: 2 additions & 2 deletions storage/bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func TestBucketAttrsToRawBucket(t *testing.T) {
Logging: &raw.BucketLogging{LogBucket: "lb", LogObjectPrefix: "p"},
Website: &raw.BucketWebsite{MainPageSuffix: "mps", NotFoundPage: "404"},
Autoclass: &raw.BucketAutoclass{Enabled: true, TerminalStorageClass: "NEARLINE"},
SoftDeletePolicy: &raw.BucketSoftDeletePolicy{RetentionDurationSeconds: 60 * 60},
SoftDeletePolicy: &raw.BucketSoftDeletePolicy{RetentionDurationSeconds: 60 * 60, ForceSendFields: []string{"RetentionDurationSeconds"}},
HierarchicalNamespace: &raw.BucketHierarchicalNamespace{Enabled: true},
Lifecycle: &raw.BucketLifecycle{
Rule: []*raw.BucketLifecycleRule{{
Expand Down Expand Up @@ -448,7 +448,7 @@ func TestBucketAttrsToUpdateToRawBucket(t *testing.T) {
Website: &raw.BucketWebsite{MainPageSuffix: "mps", NotFoundPage: "404"},
StorageClass: "NEARLINE",
Autoclass: &raw.BucketAutoclass{Enabled: true, TerminalStorageClass: "ARCHIVE", ForceSendFields: []string{"Enabled"}},
SoftDeletePolicy: &raw.BucketSoftDeletePolicy{RetentionDurationSeconds: 3600},
SoftDeletePolicy: &raw.BucketSoftDeletePolicy{RetentionDurationSeconds: 3600, ForceSendFields: []string{"RetentionDurationSeconds"}},
ForceSendFields: []string{"DefaultEventBasedHold", "Lifecycle", "Autoclass"},
}
if msg := testutil.Diff(got, want); msg != "" {
Expand Down
18 changes: 17 additions & 1 deletion storage/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4377,7 +4377,23 @@ func TestIntegration_SoftDelete(t *testing.T) {
t.Fatalf("effective time of soft delete policy should not be in the past, got: %v, test start: %v", got.EffectiveTime, testStart.UTC())
}

// Update the soft delete policy.
// Create a second bucket with an empty soft delete policy to verify
// that this leads to no retention.
b2 := client.Bucket(prefix + uidSpace.New())
if err := b2.Create(ctx, testutil.ProjID(), &BucketAttrs{SoftDeletePolicy: &SoftDeletePolicy{}}); err != nil {
t.Fatalf("error creating bucket with soft delete disabled: %v", err)
}
t.Cleanup(func() { h.mustDeleteBucket(b2) })

attrs2, err := b2.Attrs(ctx)
if err != nil {
t.Fatalf("Attrs(%q): %v", b2.name, err)
}
if got, expect := attrs2.SoftDeletePolicy.RetentionDuration, time.Duration(0); got != expect {
t.Fatalf("mismatching retention duration; got: %+v, expected: %+v", got, expect)
}

// Update the soft delete policy of the original bucket.
policy.RetentionDuration = time.Hour * 24 * 9

attrs, err = b.Update(ctx, BucketAttrsToUpdate{SoftDeletePolicy: policy})
Expand Down

0 comments on commit 8e0b838

Please sign in to comment.