vendor: github.com/aws/smithy-go v1.23.2

full diff: https://github.com/aws/smithy-go/compare/v1.23.1...v1.23.2

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2026-01-15 12:29:51 +01:00
parent 6ff97c143b
commit 18ea00a638
13 changed files with 98 additions and 47 deletions

2
go.mod
View File

@@ -18,7 +18,7 @@ require (
github.com/aws/aws-sdk-go-v2/credentials v1.18.19
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.11
github.com/aws/aws-sdk-go-v2/service/cloudwatchlogs v1.58.5
github.com/aws/smithy-go v1.23.1
github.com/aws/smithy-go v1.23.2
github.com/cloudflare/cfssl v1.6.4
github.com/containerd/cgroups/v3 v3.1.2
github.com/containerd/containerd/api v1.10.0

4
go.sum
View File

@@ -93,8 +93,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.3 h1:S5GuJZpYxE0lKeMHKn+BRTz6
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.3/go.mod h1:X4OF+BTd7HIb3L+tc4UlWHVrpgwZZIVENU15pRDVTI0=
github.com/aws/aws-sdk-go-v2/service/sts v1.38.9 h1:Ekml5vGg6sHSZLZJQJagefnVe6PmqC2oiRkBq4F7fU0=
github.com/aws/aws-sdk-go-v2/service/sts v1.38.9/go.mod h1:/e15V+o1zFHWdH3u7lpI3rVBcxszktIKuHKCY2/py+k=
github.com/aws/smithy-go v1.23.1 h1:sLvcH6dfAFwGkHLZ7dGiYF7aK6mg4CgKA/iDKjLDt9M=
github.com/aws/smithy-go v1.23.1/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
github.com/aws/smithy-go v1.23.2 h1:Crv0eatJUQhaManss33hS5r40CG3ZFH+21XSkqMrIUM=
github.com/aws/smithy-go v1.23.2/go.mod h1:LEj2LM3rBRQJxPZTB4KuzZkaZYnZPnvgIhb4pu07mx0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=

View File

@@ -1,3 +1,13 @@
# Release (2025-11-03)
## General Highlights
* **Dependency Update**: Updated to the latest SDK module versions
## Module Highlights
* `github.com/aws/smithy-go`: v1.23.2
* **Bug Fix**: Adjust the initial sizes of each middleware phase to avoid some unnecessary reallocation.
* **Bug Fix**: Avoid unnecessary allocation overhead from the metrics system when not in use.
# Release (2025-10-15)
## General Highlights

View File

@@ -3,4 +3,4 @@
package smithy
// goModuleVersion is the tagged release for this module
const goModuleVersion = "1.23.1"
const goModuleVersion = "1.23.2"

View File

@@ -9,54 +9,82 @@ var _ MeterProvider = (*NopMeterProvider)(nil)
// Meter returns a meter which creates no-op instruments.
func (NopMeterProvider) Meter(string, ...MeterOption) Meter {
return nopMeter{}
return NopMeter{}
}
type nopMeter struct{}
// NopMeter creates no-op instruments.
type NopMeter struct{}
var _ Meter = (*nopMeter)(nil)
var _ Meter = (*NopMeter)(nil)
func (nopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) {
return nopInstrument[int64]{}, nil
// Int64Counter creates a no-op instrument.
func (NopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) {
return nopInstrumentInt64, nil
}
func (nopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) {
return nopInstrument[int64]{}, nil
// Int64UpDownCounter creates a no-op instrument.
func (NopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) {
return nopInstrumentInt64, nil
}
func (nopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) {
return nopInstrument[int64]{}, nil
// Int64Gauge creates a no-op instrument.
func (NopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) {
return nopInstrumentInt64, nil
}
func (nopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) {
return nopInstrument[int64]{}, nil
// Int64Histogram creates a no-op instrument.
func (NopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) {
return nopInstrumentInt64, nil
}
func (nopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrument[int64]{}, nil
// Int64AsyncCounter creates a no-op instrument.
func (NopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrumentInt64, nil
}
func (nopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrument[int64]{}, nil
// Int64AsyncUpDownCounter creates a no-op instrument.
func (NopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrumentInt64, nil
}
func (nopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrument[int64]{}, nil
// Int64AsyncGauge creates a no-op instrument.
func (NopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrumentInt64, nil
}
func (nopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) {
return nopInstrument[float64]{}, nil
// Float64Counter creates a no-op instrument.
func (NopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) {
return nopInstrumentFloat64, nil
}
func (nopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) {
return nopInstrument[float64]{}, nil
// Float64UpDownCounter creates a no-op instrument.
func (NopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) {
return nopInstrumentFloat64, nil
}
func (nopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) {
return nopInstrument[float64]{}, nil
// Float64Gauge creates a no-op instrument.
func (NopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) {
return nopInstrumentFloat64, nil
}
func (nopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) {
return nopInstrument[float64]{}, nil
// Float64Histogram creates a no-op instrument.
func (NopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) {
return nopInstrumentFloat64, nil
}
func (nopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrument[float64]{}, nil
// Float64AsyncCounter creates a no-op instrument.
func (NopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrumentFloat64, nil
}
func (nopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrument[float64]{}, nil
// Float64AsyncUpDownCounter creates a no-op instrument.
func (NopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrumentFloat64, nil
}
func (nopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrument[float64]{}, nil
// Float64AsyncGauge creates a no-op instrument.
func (NopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) {
return nopInstrumentFloat64, nil
}
type nopInstrument[N any] struct{}
@@ -65,3 +93,6 @@ func (nopInstrument[N]) Add(context.Context, N, ...RecordMetricOption) {}
func (nopInstrument[N]) Sample(context.Context, N, ...RecordMetricOption) {}
func (nopInstrument[N]) Record(context.Context, N, ...RecordMetricOption) {}
func (nopInstrument[_]) Stop() {}
var nopInstrumentInt64 = nopInstrument[int64]{}
var nopInstrumentFloat64 = nopInstrument[float64]{}

View File

@@ -23,12 +23,14 @@ type orderedIDs struct {
items map[string]ider
}
const baseOrderedItems = 5
// selected based on the general upper bound of # of middlewares in each step
// in the downstream aws-sdk-go-v2
const baseOrderedItems = 8
func newOrderedIDs() *orderedIDs {
func newOrderedIDs(cap int) *orderedIDs {
return &orderedIDs{
order: newRelativeOrder(),
items: make(map[string]ider, baseOrderedItems),
order: newRelativeOrder(cap),
items: make(map[string]ider, cap),
}
}
@@ -141,9 +143,9 @@ type relativeOrder struct {
order []string
}
func newRelativeOrder() *relativeOrder {
func newRelativeOrder(cap int) *relativeOrder {
return &relativeOrder{
order: make([]string, 0, baseOrderedItems),
order: make([]string, 0, cap),
}
}

View File

@@ -79,7 +79,7 @@ type BuildStep struct {
// initialization added to it.
func NewBuildStep() *BuildStep {
return &BuildStep{
ids: newOrderedIDs(),
ids: newOrderedIDs(baseOrderedItems),
}
}

View File

@@ -85,7 +85,8 @@ type DeserializeStep struct {
// initialization added to it.
func NewDeserializeStep() *DeserializeStep {
return &DeserializeStep{
ids: newOrderedIDs(),
// downstream SDK typically has larger Deserialize step
ids: newOrderedIDs(baseOrderedItems * 2),
}
}

View File

@@ -79,7 +79,8 @@ type FinalizeStep struct {
// initialization added to it.
func NewFinalizeStep() *FinalizeStep {
return &FinalizeStep{
ids: newOrderedIDs(),
// downstream SDK typically has larger Finalize step
ids: newOrderedIDs(baseOrderedItems * 2),
}
}

View File

@@ -79,7 +79,7 @@ type InitializeStep struct {
// initialization added to it.
func NewInitializeStep() *InitializeStep {
return &InitializeStep{
ids: newOrderedIDs(),
ids: newOrderedIDs(baseOrderedItems),
}
}

View File

@@ -85,7 +85,7 @@ type SerializeStep struct {
// serialize the input parameters into.
func NewSerializeStep(newRequest func() interface{}) *SerializeStep {
return &SerializeStep{
ids: newOrderedIDs(),
ids: newOrderedIDs(baseOrderedItems),
newRequest: newRequest,
}
}

View File

@@ -17,6 +17,12 @@ var now = time.Now
func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) (
context.Context, ClientDo, error,
) {
// WithClientTrace is an expensive operation - avoid calling it if we're
// not actually using a metrics sink.
if _, ok := meter.(metrics.NopMeter); ok {
return parent, client, nil
}
hm, err := newHTTPMetrics(meter)
if err != nil {
return nil, nil, err

2
vendor/modules.txt vendored
View File

@@ -262,7 +262,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.23.1
# github.com/aws/smithy-go v1.23.2
## explicit; go 1.23
github.com/aws/smithy-go
github.com/aws/smithy-go/auth