From a2fddafdd33287a5d70abc614f7f7454fbef6717 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 Oct 2026 22:21:54 +0000 Subject: [PATCH] fix(deps): update module github.com/aws/smithy-go to v1.28.2 --- go.mod | 2 +- go.sum | 2 + vendor/github.com/aws/smithy-go/CHANGELOG.md | 12 + vendor/github.com/aws/smithy-go/Makefile | 2 +- vendor/github.com/aws/smithy-go/README.md | 224 +++++++++++++----- .../aws/smithy-go/eventstream/debug.go | 2 +- .../aws/smithy-go/eventstream/header.go | 2 +- .../aws/smithy-go/go_module_metadata.go | 2 +- .../aws/smithy-go/transport/http/host.go | 18 +- .../aws/smithy-go/transport/http/url.go | 7 + vendor/modules.txt | 2 +- 11 files changed, 201 insertions(+), 74 deletions(-) diff --git a/go.mod b/go.mod index d64c5dc86..5c3aa4c82 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.20.5 github.com/aws/aws-sdk-go-v2/feature/s3/transfermanager v0.4.7 github.com/aws/aws-sdk-go-v2/service/s3 v1.113.1 - github.com/aws/smithy-go v1.28.1 + github.com/aws/smithy-go v1.28.2 github.com/cbergoon/merkletree v0.5.0 github.com/cilium/ebpf v0.22.0 github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 diff --git a/go.sum b/go.sum index 2a4d8489f..0202a7eec 100644 --- a/go.sum +++ b/go.sum @@ -74,6 +74,8 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.51.0 h1:Zpnqa6XtrNzXZnwbdCqHOXpXhMsa github.com/aws/aws-sdk-go-v2/service/sts v1.51.0/go.mod h1:/8JRcdTt//hG0Q4BTmGbuOplT7ABe+5rdtqUHqXvYIM= github.com/aws/smithy-go v1.28.1 h1:R/nXH00c8qcfCzQVELtRw+eLQWtzv+VAIEFJ1/xxXlQ= github.com/aws/smithy-go v1.28.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= +github.com/aws/smithy-go v1.28.2 h1:myhcykQcatTul2B/zITjDk203G7t0awUAs1hVry5Bvg= +github.com/aws/smithy-go v1.28.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/brianvoe/gofakeit/v6 v6.28.0 h1:Xib46XXuQfmlLS2EXRuJpqcw8St6qSZz75OUo0tgAW4= diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 0d26e973c..1bd86cb97 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,15 @@ +# Release (2026-09-18) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.28.2 + * **Bug Fix**: Avoid allocating a slice in ValidateEndpointHost by indexing into the hostname instead of using strings.Split. + * **Bug Fix**: Fix event stream decode panic on unknown header value type. + * **Bug Fix**: Fix schema-serde CBOR decode panic on malformed string/blob length. + * **Bug Fix**: JoinPath keeps a trailing slash when the added path is a slash. + # Release (2026-08-26) ## General Highlights diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile index a12b124d5..fb0670f0e 100644 --- a/vendor/github.com/aws/smithy-go/Makefile +++ b/vendor/github.com/aws/smithy-go/Makefile @@ -26,7 +26,7 @@ smithy-publish-local: cd codegen && ./gradlew publishToMavenLocal smithy-build: - cd codegen && ./gradlew build + cd codegen && ./gradlew build --stacktrace smithy-clean: cd codegen && ./gradlew clean diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md index ac5a0a613..28f3d1d5b 100644 --- a/vendor/github.com/aws/smithy-go/README.md +++ b/vendor/github.com/aws/smithy-go/README.md @@ -1,73 +1,52 @@ # Smithy Go -[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml) +[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml) +[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml) +[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE) -[Smithy](https://smithy.io/) code generators for Go and the accompanying smithy-go runtime. +[Smithy](https://smithy.io/) code generators for [Go](https://go.dev/), and +the runtime package the generated code depends on. -The smithy-go runtime requires a minimum version of Go 1.24. +> [!WARNING] +> All interfaces in this repository are subject to change. The client code +> generator in particular powers +> [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2), but arbitrary client +> generation is in an early stage of development: +> * Generated clients are missing certain features that were originally +> implemented SDK-side (e.g. retries) +> * There may be bugs +> * The public APIs of generated clients may be unstable +> +> If you are interested in using the client code generators, we encourage you +> to experiment and share any feedback with us in an issue. -**WARNING: All interfaces are subject to change.** +--- -## :warning: Client codegen is unstable +This repository contains two major components: -The client code generator in this repository powers the aws-sdk-go-v2. -Arbitrary client generation, while possible, is in an early stage of -development: +1. **Codegen** ([`codegen/`](codegen)): A Java/Gradle-based Smithy build + plugin that generates Go client, server, and shape code from Smithy + models. +2. **Runtime** (this module, `github.com/aws/smithy-go`): The Go packages + that code generated by the plugins above depends on. -* Generated clients are missing certain features that were originally - implemented SDK-side (e.g. retries) -* There may be bugs -* The public APIs of generated clients may be unstable +> [!NOTE] +> This repository does not contain any generated clients, such as for S3 or +> other AWS services. Rather, these are the tools that facilitate generating +> those clients (and non-AWS Smithy clients) from a Smithy model. -If you are interested in using the client code generators, we encourage you to -experiment and share any feedback with us in an issue. +## Getting started -## Plugins +If this is your first time using Smithy, follow the +[Smithy Quickstart guide](https://smithy.io/2.0/quickstart.html) to learn the +basics and create a simple Smithy model. -This repository implements the following Smithy build plugins: - -| ID | GAV prefix | Description | -|----|------------|-------------| -| `go-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go client code generation for Smithy models. | -| `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. | -| `go-shape-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go shape code generation (types only) for Smithy models. | - -## `go-codegen` - -### Configuration - -[`GoSettings`](codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java) -contains all of the settings enabled from `smithy-build.json` and helper -methods and types. The up-to-date list of top-level properties enabled for -`go-client-codegen` can be found in `GoSettings::from()`. - -| Setting | Type | Required | Description | -|-----------------|---------|----------|-----------------------------------------------------------------------------------------------------------------------------| -| `service` | string | yes | The Shape ID of the service for which to generate the client. | -| `module` | string | yes | Name of the module in `generated.json` (and `go.mod` if `generateGoMod` is enabled) and `doc.go`. | -| `generateGoMod` | boolean | | Whether to generate a default `go.mod` file. The default value is `false`. | -| `goDirective` | string | | [Go directive](https://go.dev/ref/mod#go-mod-file-go) of the module. The default value is the minimum supported Go version. | +The smithy-go runtime requires a minimum version of **Go 1.24**. -### Supported protocols +### Codegen -The protocol a client uses is configured by the `Protocol` field on a client's -`Options`. The SDK will configure a default based on the protocol traits -applied to the modeled service. - -| Protocol | Notes | -|----------|-------| -| [`smithy.protocols#rpcv2Cbor`](https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html) | | -| [`aws.protocols#restJson1`](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html) | | -| [`aws.protocols#restXml`](https://smithy.io/2.0/aws/protocols/aws-restxml-protocol.html) | | -| [`aws.protocols#awsJson1_0`](https://smithy.io/2.0/aws/protocols/aws-json-1_0-protocol.html) | | -| [`aws.protocols#awsJson1_1`](https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html) | | -| [`aws.protocols#awsQuery`](https://smithy.io/2.0/aws/protocols/aws-query-protocol.html) | | -| [`aws.protocols#ec2Query`](https://smithy.io/2.0/aws/protocols/aws-ec2-query-protocol.html) | | - -### Example - -This example applies the `go-codegen` build plugin to the Smithy quickstart -example created from `smithy init`: +To generate a Go client from a Smithy model, apply the `go-codegen` plugin in +your `smithy-build.json`: ```json { @@ -91,15 +70,136 @@ example created from `smithy init`: } ``` -## `go-server-codegen` +This repository implements the following Smithy build plugins: + +| ID | GAV prefix | Description | +|----|------------|-------------| +| `go-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Go client code generation for Smithy models. | +| `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Go server code generation for Smithy models (work-in-progress, undocumented). | +| `go-shape-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Go shape code generation (types only) for Smithy models (work-in-progress, undocumented). | -This plugin is a work-in-progress and is currently undocumented. +#### `go-codegen` settings -## `go-shape-codegen` +[`GoSettings`](codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java) +contains all of the settings enabled from `smithy-build.json`. The up-to-date +list of top-level properties enabled for `go-codegen` can be found in +`GoSettings::from()`. -This plugin is a work-in-progress and is currently undocumented. +| Setting | Type | Required | Description | +|-----------------|---------|----------|-------------------------------------------------------------------------------------------------------------------------------| +| `service` | string | yes | The Shape ID of the service for which to generate the client. | +| `module` | string | yes | Name of the module in `generated.json` (and `go.mod` if `generateGoMod` is enabled) and `doc.go`. | +| `generateGoMod` | boolean | | Whether to generate a default `go.mod` file. The default value is `false`. | +| `goDirective` | string | | [Go directive](https://go.dev/ref/mod#go-mod-file-go) of the module. The default value is the minimum supported Go version. | + +#### Supported protocols + +The protocol a generated client uses is configured by the `Protocol` field on +the client's `Options`. The SDK configures a default based on the protocol +traits applied to the modeled service. + +Each protocol is implemented as its own package under +[`transport/http/protocol`](transport/http/protocol). Serialization for these +protocols is handled by internal codecs under `protocol/internal` (e.g. +`protocol/internal/json`, `protocol/internal/cbor`, +`protocol/internal/xml`); these largely supersede the top-level +[`encoding/`](encoding) packages of the same name; see +[Encoding](#encoding) below. + +| Protocol | Package | Notes | +|----------|---------|-------| +| [`smithy.protocols#rpcv2Cbor`](https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html) | [`protocol/rpcv2`](transport/http/protocol/rpcv2) | | +| [`aws.protocols#restJson1`](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html) | [`protocol/restjson1`](transport/http/protocol/restjson1) | | +| [`aws.protocols#restXml`](https://smithy.io/2.0/aws/protocols/aws-restxml-protocol.html) | [`protocol/restxml`](transport/http/protocol/restxml) | | +| [`aws.protocols#awsJson1_0`](https://smithy.io/2.0/aws/protocols/aws-json-1_0-protocol.html) | [`protocol/awsjson`](transport/http/protocol/awsjson) | `awsjson.New10` | +| [`aws.protocols#awsJson1_1`](https://smithy.io/2.0/aws/protocols/aws-json-1_1-protocol.html) | [`protocol/awsjson`](transport/http/protocol/awsjson) | `awsjson.New11` | +| [`aws.protocols#awsQuery`](https://smithy.io/2.0/aws/protocols/aws-query-protocol.html) | [`protocol/awsquery`](transport/http/protocol/awsquery) | | +| [`aws.protocols#ec2Query`](https://smithy.io/2.0/aws/protocols/aws-ec2-query-protocol.html) | [`protocol/ec2query`](transport/http/protocol/ec2query) | | + +These packages are client-only; smithy-go does not currently implement +server-side protocol support. + +Building and testing the codegen plugins is done via Gradle from the +`codegen/` directory: + +```bash +# Build and test codegen +cd codegen && ./gradlew build + +# Publish to local Maven for downstream use +cd codegen && ./gradlew publishToMavenLocal +``` + +See [`codegen/README.md`](codegen/README.md) for local setup instructions. + +## Runtime packages + +All generated clients depend on this module (`github.com/aws/smithy-go`) at +runtime. It also includes a few standalone submodules published separately. + +### Core + +- [`middleware`](middleware): The middleware stack that drives the operation + pipeline. +- [`transport/http`](transport/http): HTTP request/response types and + middleware. +- [`auth`](auth): Auth identity and scheme interfaces. + - [`auth/bearer`](auth/bearer): Bearer token auth. +- [`endpoints`](endpoints): Endpoint resolution types. +- [`context`](context): Context helpers. +- [`logging`](logging): Logging interfaces. +- [`tracing`](tracing): Tracing interfaces. +- [`metrics`](metrics): Metrics interfaces. + +### Encoding + +Wire format encoders/decoders under [`encoding/`](encoding). + +> [!NOTE] +> Most of these packages are effectively legacy. The protocol +> implementations under [`transport/http/protocol`](transport/http/protocol) +> (used by current client codegen) have their own internal codecs under +> `protocol/internal/*` and generally do not build on these packages. +> The `encoding/json`, `encoding/xml`, and `encoding/cbor` packages otherwise +> remain in use by [`document/json`](document/json)/[`document/cbor`](document/cbor) +> and [`eventstream`](eventstream), and by existing generated SDK code that +> predates the newer protocol implementations. + +- [`encoding/json`](encoding/json): JSON encoding/decoding. +- [`encoding/xml`](encoding/xml): XML encoding/decoding. +- [`encoding/cbor`](encoding/cbor): CBOR encoding/decoding (used by + `rpcv2Cbor`). +- [`encoding/httpbinding`](encoding/httpbinding): HTTP binding serde helpers. + +### Document + +- [`document`](document): Smithy document type abstraction. + - [`document/json`](document/json): JSON document codec. + +### Utilities + +- [`container`](container): Generic container types. +- [`io`](io): I/O helpers. +- [`ptr`](ptr): Pointer-to/from-value helpers. +- [`time`](time): Smithy timestamp format helpers. +- [`rand`](rand): UUID/randomness helpers. +- [`testing`](testing): Test assertion helpers for generated protocol tests. + +### Standalone modules + +These are published as separate Go modules, each with its own `go.mod`. + +- [`aws-http-auth`](aws-http-auth): AWS SigV4/SigV4A HTTP signing. +- [`tracing/smithyoteltracing`](tracing/smithyoteltracing): OpenTelemetry + tracing adapter. +- [`metrics/smithyotelmetrics`](metrics/smithyotelmetrics): OpenTelemetry + metrics adapter. + +## Development + +See [CONTRIBUTING](CONTRIBUTING.md) for more information on contributing to +this project, including the changelog process for runtime changes. ## License This project is licensed under the Apache-2.0 License. - diff --git a/vendor/github.com/aws/smithy-go/eventstream/debug.go b/vendor/github.com/aws/smithy-go/eventstream/debug.go index 6049402b1..ca4394f8b 100644 --- a/vendor/github.com/aws/smithy-go/eventstream/debug.go +++ b/vendor/github.com/aws/smithy-go/eventstream/debug.go @@ -139,6 +139,6 @@ func valueFromType(typ valueType, val any) (Value, error) { copy(tv[:], v) return tv, err default: - panic(fmt.Sprintf("unknown type, %s, %T", typ.String(), val)) + return nil, fmt.Errorf("unable to decode unknown type, %s, %T", typ.String(), val) } } diff --git a/vendor/github.com/aws/smithy-go/eventstream/header.go b/vendor/github.com/aws/smithy-go/eventstream/header.go index f580bda4c..b5aacca00 100644 --- a/vendor/github.com/aws/smithy-go/eventstream/header.go +++ b/vendor/github.com/aws/smithy-go/eventstream/header.go @@ -151,7 +151,7 @@ func decodeHeaderValue(r io.Reader) (Value, error) { err = tv.decode(r) v = tv default: - panic(fmt.Sprintf("unknown value type %d", raw.Type)) + return nil, fmt.Errorf("unable to decode header of unknown value type %d", raw.Type) } // Error could be EOF, let caller deal with it diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index c945a45db..e5f64bbdd 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.28.1" +const goModuleVersion = "1.28.2" diff --git a/vendor/github.com/aws/smithy-go/transport/http/host.go b/vendor/github.com/aws/smithy-go/transport/http/host.go index b504a455d..b1227bf9e 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/host.go +++ b/vendor/github.com/aws/smithy-go/transport/http/host.go @@ -29,17 +29,23 @@ func ValidateEndpointHost(host string) error { hostname = host } - labels := strings.Split(hostname, ".") - for i, label := range labels { - if i == len(labels)-1 && len(label) == 0 { - // Allow trailing dot for FQDN hosts. - continue + for start := 0; ; { + idx := strings.IndexByte(hostname[start:], '.') + if idx < 0 { + // Last label. Allow it to be empty to permit a trailing dot for + // FQDN hosts. + if label := hostname[start:]; len(label) != 0 && !ValidHostLabel(label) { + errors.WriteString("\nendpoint host domain labels must match \"[a-zA-Z0-9-]{1,63}\", but found: ") + errors.WriteString(label) + } + break } - if !ValidHostLabel(label) { + if label := hostname[start : start+idx]; !ValidHostLabel(label) { errors.WriteString("\nendpoint host domain labels must match \"[a-zA-Z0-9-]{1,63}\", but found: ") errors.WriteString(label) } + start += idx + 1 } if len(hostname) == 0 && len(port) != 0 { diff --git a/vendor/github.com/aws/smithy-go/transport/http/url.go b/vendor/github.com/aws/smithy-go/transport/http/url.go index 60a5fc100..99f9737af 100644 --- a/vendor/github.com/aws/smithy-go/transport/http/url.go +++ b/vendor/github.com/aws/smithy-go/transport/http/url.go @@ -12,6 +12,9 @@ func JoinPath(a, b string) string { a = "/" + a } + // Record b's trailing slash before the strip below can erase it (a bare + // "/" becomes ""). + keepTrailing := len(b) > 0 && b[len(b)-1] == '/' if len(b) != 0 && b[0] == '/' { b = b[1:] } @@ -20,6 +23,10 @@ func JoinPath(a, b string) string { a = a + "/" } + if keepTrailing && len(b) == 0 && a[len(a)-1] != '/' { + a = a + "/" + } + return a + b } diff --git a/vendor/modules.txt b/vendor/modules.txt index b2ae7d536..30a929799 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -173,7 +173,7 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc/types github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.28.1 +# github.com/aws/smithy-go v1.28.2 ## explicit; go 1.24 github.com/aws/smithy-go github.com/aws/smithy-go/auth