aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/googleapis
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-04-01 01:53:22 +0000
committerTaras Madan <tarasmadan@google.com>2024-04-02 12:41:27 +0000
commiteb2966c4fa240b7304c49e53b51867d8a57eb327 (patch)
tree15f96d9c4799c0480f4593ad11e016cea3cfedc2 /vendor/github.com/googleapis
parentdc1b48ca3a692a9bf0b8dde6a9640a92632a9a6d (diff)
mod: bump cloud.google.com/go/secretmanager from 1.11.5 to 1.12.0
Bumps [cloud.google.com/go/secretmanager](https://github.com/googleapis/google-cloud-go) from 1.11.5 to 1.12.0. - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/documentai/CHANGES.md) - [Commits](https://github.com/googleapis/google-cloud-go/compare/secretmanager/v1.11.5...dlp/v1.12.0) --- updated-dependencies: - dependency-name: cloud.google.com/go/secretmanager dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/googleapis')
-rw-r--r--vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json2
-rw-r--r--vendor/github.com/googleapis/gax-go/v2/CHANGES.md7
-rw-r--r--vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go18
-rw-r--r--vendor/github.com/googleapis/gax-go/v2/internal/version.go2
4 files changed, 27 insertions, 2 deletions
diff --git a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json b/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json
index 34107104e..b2a67c0a2 100644
--- a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json
+++ b/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- "v2": "2.12.1"
+ "v2": "2.12.2"
}
diff --git a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md b/vendor/github.com/googleapis/gax-go/v2/CHANGES.md
index e16ab6033..5f0908e68 100644
--- a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md
+++ b/vendor/github.com/googleapis/gax-go/v2/CHANGES.md
@@ -1,5 +1,12 @@
# Changelog
+## [2.12.2](https://github.com/googleapis/gax-go/compare/v2.12.1...v2.12.2) (2024-02-23)
+
+
+### Bug Fixes
+
+* **v2/callctx:** fix SetHeader race by cloning header map ([#326](https://github.com/googleapis/gax-go/issues/326)) ([534311f](https://github.com/googleapis/gax-go/commit/534311f0f163d101f30657736c0e6f860e9c39dc))
+
## [2.12.1](https://github.com/googleapis/gax-go/compare/v2.12.0...v2.12.1) (2024-02-13)
diff --git a/vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go b/vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go
index 9aab3d91f..f5af5c990 100644
--- a/vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go
+++ b/vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go
@@ -74,9 +74,27 @@ func SetHeaders(ctx context.Context, keyvals ...string) context.Context {
h, ok := ctx.Value(headerKey).(map[string][]string)
if !ok {
h = make(map[string][]string)
+ } else {
+ h = cloneHeaders(h)
}
+
for i := 0; i < len(keyvals); i = i + 2 {
h[keyvals[i]] = append(h[keyvals[i]], keyvals[i+1])
}
return context.WithValue(ctx, headerKey, h)
}
+
+// cloneHeaders makes a new key-value map while reusing the value slices.
+// As such, new values should be appended to the value slice, and modifying
+// indexed values is not thread safe.
+//
+// TODO: Replace this with maps.Clone when Go 1.21 is the minimum version.
+func cloneHeaders(h map[string][]string) map[string][]string {
+ c := make(map[string][]string, len(h))
+ for k, v := range h {
+ vc := make([]string, len(v))
+ copy(vc, v)
+ c[k] = vc
+ }
+ return c
+}
diff --git a/vendor/github.com/googleapis/gax-go/v2/internal/version.go b/vendor/github.com/googleapis/gax-go/v2/internal/version.go
index 890d4819e..53c04d4d4 100644
--- a/vendor/github.com/googleapis/gax-go/v2/internal/version.go
+++ b/vendor/github.com/googleapis/gax-go/v2/internal/version.go
@@ -30,4 +30,4 @@
package internal
// Version is the current tagged release of the library.
-const Version = "2.12.1"
+const Version = "2.12.2"