go.mod: update osbuild/images to v0.69.0

This commit is contained in:
Achilleas Koutsou 2024-07-02 14:42:15 +02:00
parent 1cc90c6a0b
commit 8ac80e8abc
611 changed files with 28281 additions and 32629 deletions

View file

@ -1,3 +1,3 @@
{
"v2": "2.12.4"
"v2": "2.12.5"
}

View file

@ -1,5 +1,12 @@
# Changelog
## [2.12.5](https://github.com/googleapis/gax-go/compare/v2.12.4...v2.12.5) (2024-06-18)
### Bug Fixes
* **v2/apierror:** fix (*APIError).Error() for unwrapped Status ([#351](https://github.com/googleapis/gax-go/issues/351)) ([22c16e7](https://github.com/googleapis/gax-go/commit/22c16e7bff5402bdc4c25063771cdd01c650b500)), refs [#350](https://github.com/googleapis/gax-go/issues/350)
## [2.12.4](https://github.com/googleapis/gax-go/compare/v2.12.3...v2.12.4) (2024-05-03)

View file

@ -206,8 +206,10 @@ func (a *APIError) Error() string {
// Truncate the googleapi.Error message because it dumps the Details in
// an ugly way.
msg = fmt.Sprintf("googleapi: Error %d: %s", a.httpErr.Code, a.httpErr.Message)
} else if a.status != nil {
} else if a.status != nil && a.err != nil {
msg = a.err.Error()
} else if a.status != nil {
msg = a.status.Message()
}
return strings.TrimSpace(fmt.Sprintf("%s\n%s", msg, a.details))
}

View file

@ -163,11 +163,38 @@ func insertMetadata(ctx context.Context, keyvals ...string) metadata.MD {
out = metadata.MD(make(map[string][]string))
}
headers := callctx.HeadersFromContext(ctx)
for k, v := range headers {
out[k] = append(out[k], v...)
// x-goog-api-client is a special case that we want to make sure gets merged
// into a single header.
const xGoogHeader = "x-goog-api-client"
var mergedXgoogHeader strings.Builder
for k, vals := range headers {
if k == xGoogHeader {
// Merge all values for the x-goog-api-client header set on the ctx.
for _, v := range vals {
mergedXgoogHeader.WriteString(v)
mergedXgoogHeader.WriteRune(' ')
}
continue
}
out[k] = append(out[k], vals...)
}
for i := 0; i < len(keyvals); i = i + 2 {
out[keyvals[i]] = append(out[keyvals[i]], keyvals[i+1])
if keyvals[i] == xGoogHeader {
// Merge the x-goog-api-client header values set on the ctx with any
// values passed in for it from the client.
mergedXgoogHeader.WriteString(keyvals[i+1])
mergedXgoogHeader.WriteRune(' ')
}
}
// Add the x goog header back in, replacing the separate values that were set.
if mergedXgoogHeader.Len() > 0 {
out[xGoogHeader] = []string{mergedXgoogHeader.String()[:mergedXgoogHeader.Len()-1]}
}
return out
}

View file

@ -30,4 +30,4 @@
package internal
// Version is the current tagged release of the library.
const Version = "2.12.4"
const Version = "2.12.5"