Skip to content

Commit

Permalink
Updates SDK for Go 1.17 (#4061)
Browse files Browse the repository at this point in the history
* Updates SDK's `build` tags to use go 1.17's formatting style of `// go:build ...`.
* Updates Makefile's sandbox test statements to use common pattern instead of individually defined.
* Updates CI for Go 1.17.
  • Loading branch information
jasdel authored Aug 16, 2021
1 parent 8b73af7 commit abb93ec
Show file tree
Hide file tree
Showing 358 changed files with 503 additions and 214 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:

full-test:
name: Full SDK and tools test
# Tests for activily maintained Go versions.
# Tests for actively maintained Go versions.
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version:
- 1.15.x
- 1.16.x
- 1.17.x
steps:
- name: Setup Go
uses: actions/setup-go@v2
Expand Down Expand Up @@ -50,6 +50,7 @@ jobs:
- 1.12.x
- 1.13.x
- 1.14.x
- 1.15.x
steps:
- name: Setup Go
uses: actions/setup-go@v2
Expand Down
109 changes: 16 additions & 93 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,99 +108,22 @@ cleanup-integ-buckets:
###################
# Sandbox Testing #
###################
sandbox-tests: sandbox-test-go1.5 sandbox-test-go1.6 sandbox-test-go1.7 sandbox-test-go1.8 sandbox-test-go1.9 sandbox-test-go1.10 sandbox-test-go1.11 sandbox-test-go1.12 sandbox-test-go1.13 sandbox-test-go1.14 sandbox-test-go1.15 sandbox-test-gotip

sandbox-build-go1.5:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.5 -t "aws-sdk-go-1.5" .
sandbox-go1.5: sandbox-build-go1.5
docker run -i -t aws-sdk-go-1.5 bash
sandbox-test-go1.5: sandbox-build-go1.5
docker run -t aws-sdk-go-1.5

sandbox-build-go1.6:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.6 -t "aws-sdk-go-1.6" .
sandbox-go1.6: sandbox-build-go1.6
docker run -i -t aws-sdk-go-1.6 bash
sandbox-test-go1.6: sandbox-build-go1.6
docker run -t aws-sdk-go-1.6

sandbox-build-go1.7:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.7 -t "aws-sdk-go-1.7" .
sandbox-go1.7: sandbox-build-go1.7
docker run -i -t aws-sdk-go-1.7 bash
sandbox-test-go1.7: sandbox-build-go1.7
docker run -t aws-sdk-go-1.7

sandbox-build-go1.8:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.8 -t "aws-sdk-go-1.8" .
sandbox-go1.8: sandbox-build-go1.8
docker run -i -t aws-sdk-go-1.8 bash
sandbox-test-go1.8: sandbox-build-go1.8
docker run -t aws-sdk-go-1.8

sandbox-build-go1.9:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.9 -t "aws-sdk-go-1.9" .
sandbox-go1.9: sandbox-build-go1.9
docker run -i -t aws-sdk-go-1.9 bash
sandbox-test-go1.9: sandbox-build-go1.9
docker run -t aws-sdk-go-1.9

sandbox-build-go1.10:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.10 -t "aws-sdk-go-1.10" .
sandbox-go1.10: sandbox-build-go1.10
docker run -i -t aws-sdk-go-1.10 bash
sandbox-test-go1.10: sandbox-build-go1.10
docker run -t aws-sdk-go-1.10

sandbox-build-go1.11:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.11 -t "aws-sdk-go-1.11" .
sandbox-go1.11: sandbox-build-go1.11
docker run -i -t aws-sdk-go-1.11 bash
sandbox-test-go1.11: sandbox-build-go1.11
docker run -t aws-sdk-go-1.11

sandbox-build-go1.12:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.12 -t "aws-sdk-go-1.12" .
sandbox-go1.12: sandbox-build-go1.12
docker run -i -t aws-sdk-go-1.12 bash
sandbox-test-go1.12: sandbox-build-go1.12
docker run -t aws-sdk-go-1.12

sandbox-build-go1.13:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.13 -t "aws-sdk-go-1.13" .
sandbox-go1.13: sandbox-build-go1.13
docker run -i -t aws-sdk-go-1.13 bash
sandbox-test-go1.13: sandbox-build-go1.13
docker run -t aws-sdk-go-1.13

sandbox-build-go1.14:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.14 -t "aws-sdk-go-1.14" .
sandbox-go1.14: sandbox-build-go1.14
docker run -i -t aws-sdk-go-1.14 bash
sandbox-test-go1.14: sandbox-build-go1.14
docker run -t aws-sdk-go-1.14

sandbox-build-go1.15:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.15 -t "aws-sdk-go-1.15" .
sandbox-go1.15: sandbox-build-go1.15
docker run -i -t aws-sdk-go-1.15 bash
sandbox-test-go1.15: sandbox-build-go1.15
docker run -t aws-sdk-go-1.15

sandbox-build-go1.16:
docker build -f ./awstesting/sandbox/Dockerfile.test.go1.16 -t "aws-sdk-go-1.16" .
sandbox-go1.16: sandbox-build-go1.16
docker run -i -t aws-sdk-go-1.16 bash
sandbox-test-go1.16: sandbox-build-go1.16
docker run -t aws-sdk-go-1.16

sandbox-build-gotip:
@echo "Run make update-aws-golang-tip, if this test fails because missing aws-golang:tip container"
docker build -f ./awstesting/sandbox/Dockerfile.test.gotip -t "aws-sdk-go-tip" .
sandbox-gotip: sandbox-build-gotip
docker run -i -t aws-sdk-go-tip bash
sandbox-test-gotip: sandbox-build-gotip
docker run -t aws-sdk-go-tip
sandbox-tests: sandbox-test-go1.5 sandbox-test-go1.6 sandbox-test-go1.7 sandbox-test-go1.8 sandbox-test-go1.9 sandbox-test-go1.10 sandbox-test-go1.11 sandbox-test-go1.12 sandbox-test-go1.13 sandbox-test-go1.14 sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-go1.17 sandbox-test-gotip

sandbox-build-%:
@# sandbox-build-go1.17
@# sandbox-build-gotip
docker build \
-f ./awstesting/sandbox/Dockerfile.test.$(subst sandbox-build-,,$@) \
-t "aws-sdk-go-$(subst sandbox-build-,,$@)" .
sandbox-run-%: sandbox-build-%
@# sandbox-run-go1.17
@# sandbox-run-gotip
docker run -i -t "aws-sdk-go-$(subst sandbox-run-,,$@)" bash
sandbox-test-%: sandbox-build-%
@# sandbox-test-go1.17
@# sandbox-test-gotip
docker run -t "aws-sdk-go-$(subst sandbox-test-,,$@)"

update-aws-golang-tip:
docker build --no-cache=true -f ./awstesting/sandbox/Dockerfile.golang-tip -t "aws-golang:tip" .
Expand Down
1 change: 1 addition & 0 deletions aws/arn/arn_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.7
// +build go1.7

package arn
Expand Down
1 change: 1 addition & 0 deletions aws/awsutil/string_value_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.7
// +build go1.7

package awsutil
Expand Down
1 change: 1 addition & 0 deletions aws/context_1_5.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.9
// +build !go1.9

package aws
Expand Down
1 change: 1 addition & 0 deletions aws/context_1_9.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.9
// +build go1.9

package aws
Expand Down
1 change: 1 addition & 0 deletions aws/context_background_1_5.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.7
// +build !go1.7

package aws
Expand Down
1 change: 1 addition & 0 deletions aws/context_background_1_7.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.7
// +build go1.7

package aws
Expand Down
1 change: 1 addition & 0 deletions aws/corehandlers/handlers_1_10_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.10
// +build go1.10

package corehandlers_test
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/context_background_go1.5.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.7
// +build !go1.7

package credentials
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/context_background_go1.7.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.7
// +build go1.7

package credentials
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/context_go1.5.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.9
// +build !go1.9

package credentials
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/context_go1.9.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.9
// +build go1.9

package credentials
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/credentials_bench_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.9
// +build go1.9

package credentials
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/credentials_go1.7_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.7
// +build go1.7

package credentials
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/plugincreds/doc_1_7.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !go1.8
// +build !go1.8

// Package plugincreds provides usage of Go plugins for providing credentials
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/plugincreds/provider.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.8
// +build go1.8

// Package plugincreds implements a credentials provider sourced from a Go
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/plugincreds/provider_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.8 && awsinclude
// +build go1.8,awsinclude

package plugincreds
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/ssocreds/os.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package ssocreds
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/ssocreds/provider_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.9
// +build go1.9

package ssocreds
Expand Down
1 change: 1 addition & 0 deletions aws/credentials/stscreds/web_identity_provider_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build go1.7
// +build go1.7

package stscreds_test
Expand Down
Loading

0 comments on commit abb93ec

Please sign in to comment.