Skip to content

Commit 226806f

Browse files
authored
Merge pull request #1361 from hashicorp/t-prepare-release
Prepare release
2 parents ce3479b + fd2ad42 commit 226806f

File tree

22 files changed

+328
-153
lines changed

22 files changed

+328
-153
lines changed

.github/workflows/pull_request.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,18 @@ jobs:
104104
with:
105105
config: ".markdownlint.yml"
106106
args: "./README.md"
107+
108+
modernize:
109+
name: modern go patterns
110+
runs-on: ubuntu-latest
111+
steps:
112+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
113+
114+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
115+
with:
116+
go-version-file: ./go.mod
117+
118+
- name: Check for modern Go patterns
119+
run: |
120+
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test ./...
121+
cd v2/awsv1shim && go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -test ./...

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
<!-- markdownlint-disable single-title -->
22
# v2.0.0 (Unreleased)
33

4+
# v2.0.0-beta.67 (2025-10-02)
5+
6+
ENHANCEMENTS
7+
8+
* Adds support for updated endpoints ([#1361](https://github.com/hashicorp/aws-sdk-go-base/pull/1361))
9+
10+
BUG FIXES
11+
12+
* Updates dependencies.
13+
414
# v2.0.0-beta.66 (2025-09-02)
515

616
ENHANCEMENTS

aws_config_test.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ aws_secret_access_key = ProfileSharedCredentialsSecretKey
10801080
t.Setenv(k, v)
10811081
}
10821082

1083-
ctx, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
1083+
ctx, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
10841084

10851085
testCase.ValidateDiags(t, diags)
10861086
if diags.HasError() {
@@ -1120,7 +1120,7 @@ func testUserAgentProducts(t *testing.T, testCase test.UserAgentTestCase) {
11201120
httpSdkAgent = request.Header.Get("X-Amz-User-Agent")
11211121
})
11221122

1123-
ctx, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
1123+
ctx, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
11241124
if diags.HasError() {
11251125
t.Fatalf("error in GetAwsConfig(): %v", diags)
11261126
}
@@ -1375,7 +1375,7 @@ region = us-west-2
13751375

13761376
testCase.Config.SkipCredsValidation = true
13771377

1378-
_, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
1378+
_, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
13791379
if diags.HasError() {
13801380
t.Fatalf("error in GetAwsConfig(): %v", diags)
13811381
}
@@ -1490,7 +1490,7 @@ max_attempts = 10
14901490

14911491
testCase.Config.SkipCredsValidation = true
14921492

1493-
_, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
1493+
_, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
14941494
if diags.HasError() {
14951495
t.Fatalf("error in GetAwsConfig(): %v", diags)
14961496
}
@@ -1621,7 +1621,7 @@ retry_mode = adaptive
16211621

16221622
testCase.Config.SkipCredsValidation = true
16231623

1624-
_, awsConfig, err := GetAwsConfig(context.Background(), testCase.Config)
1624+
_, awsConfig, err := GetAwsConfig(t.Context(), testCase.Config)
16251625
if err != nil {
16261626
t.Fatalf("error in GetAwsConfig() '%[1]T': %[1]s", err)
16271627
}
@@ -1844,7 +1844,7 @@ use_fips_endpoint = true
18441844

18451845
testCase.Config.SkipCredsValidation = true
18461846

1847-
ctx, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
1847+
ctx, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
18481848
if diags.HasError() {
18491849
t.Fatalf("error in GetAwsConfig(): %v", diags)
18501850
}
@@ -1973,7 +1973,7 @@ func TestEC2MetadataServiceClientEnableState(t *testing.T) {
19731973

19741974
testCase.Config.SkipCredsValidation = true
19751975

1976-
_, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
1976+
_, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
19771977
if diags.HasError() {
19781978
t.Fatalf("error in GetAwsConfig(): %v", diags)
19791979
}
@@ -2158,7 +2158,7 @@ ec2_metadata_service_endpoint = https://127.1.1.1:1111
21582158

21592159
testCase.Config.SkipCredsValidation = true
21602160

2161-
_, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
2161+
_, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
21622162

21632163
if diff := cmp.Diff(diags, testCase.ExpectedDiags); diff != "" {
21642164
t.Errorf("Unexpected response (+wanted, -got): %s", diff)
@@ -2281,7 +2281,7 @@ ec2_metadata_service_endpoint_mode = IPv4
22812281

22822282
testCase.Config.SkipCredsValidation = true
22832283

2284-
_, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
2284+
_, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
22852285
if diags.HasError() {
22862286
t.Fatalf("error in GetAwsConfig(): %v", diags)
22872287
}
@@ -2466,7 +2466,7 @@ ca_bundle = no-such-file
24662466

24672467
testCase.Config.SkipCredsValidation = true
24682468

2469-
_, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
2469+
_, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
24702470
if diags.HasError() {
24712471
t.Fatalf("error in GetAwsConfig(): %v", diags)
24722472
}
@@ -2686,7 +2686,7 @@ aws_secret_access_key = SharedConfigurationSourceSecretKey
26862686

26872687
testCase.Config.SkipCredsValidation = true
26882688

2689-
ctx, awsConfig, diags := GetAwsConfig(context.Background(), testCase.Config)
2689+
ctx, awsConfig, diags := GetAwsConfig(t.Context(), testCase.Config)
26902690

26912691
if diff := cmp.Diff(diags, testCase.ExpectedDiags); diff != "" {
26922692
t.Errorf("Unexpected response (+wanted, -got): %s", diff)
@@ -2924,7 +2924,7 @@ web_identity_token_file = no-such-file
29242924

29252925
for testName, testCase := range testCases {
29262926
t.Run(testName, func(t *testing.T) {
2927-
ctx := context.Background()
2927+
ctx := t.Context()
29282928

29292929
servicemocks.InitSessionTestEnv(t)
29302930

@@ -3287,7 +3287,7 @@ endpoint_url = %[2]s
32873287
t.Run(name, func(t *testing.T) {
32883288
servicemocks.InitSessionTestEnv(t)
32893289

3290-
ctx := context.Background()
3290+
ctx := t.Context()
32913291

32923292
ts := servicemocks.MockAwsApiServer("STS", []*servicemocks.MockEndpoint{
32933293
servicemocks.MockStsGetCallerIdentityValidEndpoint,
@@ -3528,7 +3528,7 @@ func TestGetAwsConfigWithAccountIDAndPartition(t *testing.T) {
35283528
defer ts.Close()
35293529
testCase.config.StsEndpoint = ts.URL
35303530

3531-
ctx, awsConfig, diags := GetAwsConfig(context.Background(), testCase.config)
3531+
ctx, awsConfig, diags := GetAwsConfig(t.Context(), testCase.config)
35323532
if diags.HasError() {
35333533
t.Fatalf("error in GetAwsConfig(): %v", diags)
35343534
}
@@ -3795,7 +3795,7 @@ func TestRetryHandlers(t *testing.T) {
37953795
SecretKey: servicemocks.MockStaticSecretKey,
37963796
SkipCredsValidation: true,
37973797
}
3798-
ctx, awsConfig, diags := GetAwsConfig(context.Background(), config)
3798+
ctx, awsConfig, diags := GetAwsConfig(t.Context(), config)
37993799
if diags.HasError() {
38003800
t.Fatalf("error in GetAwsConfig(): %v", diags)
38013801
}
@@ -3860,7 +3860,7 @@ func (r *withNoDelay) RetryDelay(attempt int, err error) (time.Duration, error)
38603860
}
38613861

38623862
func TestLogger_TfLog(t *testing.T) {
3863-
ctx := context.Background()
3863+
ctx := t.Context()
38643864
var buf bytes.Buffer
38653865
ctx = tflogtest.RootLogger(ctx, &buf)
38663866

@@ -4029,7 +4029,7 @@ func TestLogger_TfLog(t *testing.T) {
40294029
}
40304030

40314031
func TestLoggerDefaultMasking_TfLog(t *testing.T) {
4032-
ctx := context.Background()
4032+
ctx := t.Context()
40334033
var buf bytes.Buffer
40344034
ctx = tflogtest.RootLogger(ctx, &buf)
40354035

@@ -4074,7 +4074,7 @@ func TestLoggerDefaultMasking_TfLog(t *testing.T) {
40744074
}
40754075

40764076
func TestLogger_HcLog(t *testing.T) {
4077-
ctx := context.Background()
4077+
ctx := t.Context()
40784078

40794079
rootName := "hc-log-test"
40804080
expectedName := rootName + "." + loggerName

configtesting/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ sso_registration_scopes = sso:account:access
121121

122122
servicemocks.InitSessionTestEnv(t)
123123

124-
ctx := context.TODO()
124+
ctx := t.Context()
125125

126126
err := servicemocks.SsoTestSetup(t, ssoSessionName)
127127
if err != nil {
@@ -226,7 +226,7 @@ region = us-east-1
226226

227227
servicemocks.InitSessionTestEnv(t)
228228

229-
ctx := context.TODO()
229+
ctx := t.Context()
230230

231231
err := servicemocks.SsoTestSetup(t, ssoStartUrl)
232232
if err != nil {

configtesting/file_parsing.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package configtesting
55

66
import (
7-
"context"
87
"os"
98
"testing"
109

@@ -130,7 +129,7 @@ sso_start_url = https://d-123456789a.awsapps.com/start#
130129

131130
for name, tc := range testcases {
132131
t.Run(name, func(t *testing.T) {
133-
ctx := context.TODO()
132+
ctx := t.Context()
134133

135134
caseDriver := driver.TestCase()
136135

endpoints/endpoints_gen.go

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hashicorp/aws-sdk-go-base/v2
22

3-
go 1.23.6
3+
go 1.24.6
44

55
require (
66
github.com/aws/aws-sdk-go-v2 v1.39.2
@@ -21,8 +21,8 @@ require (
2121
github.com/mitchellh/go-homedir v1.1.0
2222
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.63.0
2323
go.opentelemetry.io/otel v1.38.0
24-
golang.org/x/net v0.43.0
25-
golang.org/x/text v0.28.0
24+
golang.org/x/net v0.44.0
25+
golang.org/x/text v0.29.0
2626
)
2727

2828
require (
@@ -36,7 +36,7 @@ require (
3636
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.11.9 // indirect
3737
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect
3838
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.9 // indirect
39-
github.com/aws/aws-sdk-go-v2/service/sns v1.38.1 // indirect
39+
github.com/aws/aws-sdk-go-v2/service/sns v1.38.5 // indirect
4040
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect
4141
github.com/fatih/color v1.18.0 // indirect
4242
github.com/go-logr/logr v1.4.3 // indirect
@@ -45,8 +45,8 @@ require (
4545
github.com/mattn/go-colorable v0.1.14 // indirect
4646
github.com/mattn/go-isatty v0.0.20 // indirect
4747
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
48-
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
48+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
4949
go.opentelemetry.io/otel/metric v1.38.0 // indirect
5050
go.opentelemetry.io/otel/trace v1.38.0 // indirect
51-
golang.org/x/sys v0.35.0 // indirect
51+
golang.org/x/sys v0.36.0 // indirect
5252
)

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ github.com/aws/aws-sdk-go-v2/service/route53 v1.57.2 h1:S3UZycqIGdXUDZkHQ/dTo99m
3434
github.com/aws/aws-sdk-go-v2/service/route53 v1.57.2/go.mod h1:j4q6vBiAJvH9oxFyFtZoV739zxVMsSn26XNFvFlorfU=
3535
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.3 h1:P18I4ipbk+b/3dZNq5YYh+Hq6XC0vp5RWkLp1tJldDA=
3636
github.com/aws/aws-sdk-go-v2/service/s3 v1.88.3/go.mod h1:Rm3gw2Jov6e6kDuamDvyIlZJDMYk97VeCZ82wz/mVZ0=
37-
github.com/aws/aws-sdk-go-v2/service/sns v1.38.1 h1:6AqFh9gI+BEOlKRXaYryGMCwygwaTlISVUs6qEMosaU=
38-
github.com/aws/aws-sdk-go-v2/service/sns v1.38.1/go.mod h1:wZGK3CJNllAOeJ/xrnyTHotaXEvtC27KOLMMKGBeT+4=
37+
github.com/aws/aws-sdk-go-v2/service/sns v1.38.5 h1:c0hINjMfDQvQLJJxfNNcIaLYVLC7E0W2zOQOVVKLnnU=
38+
github.com/aws/aws-sdk-go-v2/service/sns v1.38.5/go.mod h1:E427ZzdOMWh/4KtD48AGfbWLX14iyw9URVOdIwtv80o=
3939
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.8 h1:cWiY+//XL5QOYKJyf4Pvt+oE/5wSIi095+bS+ME2lGw=
4040
github.com/aws/aws-sdk-go-v2/service/sqs v1.42.8/go.mod h1:sLvnKf0p0sMQ33nkJGP2NpYyWHMojpL0O9neiCGc9lc=
4141
github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s=
@@ -88,8 +88,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
8888
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
8989
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
9090
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
91-
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
92-
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
91+
go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64=
92+
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
9393
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.63.0 h1:0W0GZvzQe514c3igO063tR0cFVStoABt1agKqlYToL8=
9494
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.63.0/go.mod h1:wIvTiRUU7Pbfqas/5JVjGZcftBeSAGSYVMOHWzWG0qE=
9595
go.opentelemetry.io/otel v1.38.0 h1:RkfdswUDRimDg0m2Az18RKOsnI8UDzppJAtj01/Ymk8=
@@ -100,18 +100,18 @@ go.opentelemetry.io/otel/sdk v1.38.0 h1:l48sr5YbNf2hpCUj/FoGhW9yDkl+Ma+LrVl8qaM5
100100
go.opentelemetry.io/otel/sdk v1.38.0/go.mod h1:ghmNdGlVemJI3+ZB5iDEuk4bWA3GkTpW+DOoZMYBVVg=
101101
go.opentelemetry.io/otel/trace v1.38.0 h1:Fxk5bKrDZJUH+AMyyIXGcFAPah0oRcT+LuNtJrmcNLE=
102102
go.opentelemetry.io/otel/trace v1.38.0/go.mod h1:j1P9ivuFsTceSWe1oY+EeW3sc+Pp42sO++GHkg4wwhs=
103-
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
104-
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
103+
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
104+
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
105105
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
106106
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
107107
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
108108
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
109109
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
110110
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
111-
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
112-
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
113-
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
114-
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
111+
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
112+
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
113+
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
114+
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
115115
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
116116
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
117117
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

go.work

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
go 1.23.6
1+
go 1.24.6
22

33
use (
44
.

0 commit comments

Comments
 (0)