Skip to content

Commit 14923fe

Browse files
authored
Updates SDK for Go 1.17 (#1381)
* 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.
1 parent 4fa06e5 commit 14923fe

File tree

120 files changed

+153
-32
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+153
-32
lines changed

.github/workflows/codegen.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest]
1616
java-version: ['11', '8']
17-
go-version: [1.16]
17+
go-version: [1.17]
1818
env:
1919
JAVA_TOOL_OPTIONS: "-Xmx2g"
2020
steps:

.github/workflows/go.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ubuntu-latest, macos-latest]
19-
go-version: [1.16, 1.15]
19+
go-version: [1.17, 1.16, 1.15]
2020
steps:
2121
- uses: actions/checkout@v2
2222

@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
matrix:
3636
os: [windows-latest]
37-
go-version: [1.16, 1.15]
37+
go-version: [1.17, 1.16, 1.15]
3838
env:
3939
EACHMODULE_SKIP: "internal\\repotools\\changes"
4040
steps:

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
14-
go-version: [1.16.x]
14+
go-version: [1.17.x]
1515
os: [ubuntu-latest] # other options: macos-latest, windows-latest
1616
steps:
1717
- uses: actions/checkout@v2
1818
- name: golangci-lint
1919
uses: golangci/golangci-lint-action@v2
2020
with:
21-
# Required: the version of golangci-lint is required and must be specified without patch version
21+
# Required: the version of golangci-lint is required and must be
22+
# specified without patch version
2223
version: latest
23-
# the following causes golangci-init to do nothing, so all it does is install golang and golangci
24+
# the following causes golangci-init to do nothing, so all it does is
25+
# install golang and golangci
2426
args: --version
2527
# Show only new issues if it's a pull request. The default value is `false`.
2628
# only-new-issues: true

Makefile

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -442,32 +442,24 @@ sdkv1check:
442442
###################
443443
# Sandbox Testing #
444444
###################
445-
.PHONY: sandbox-tests sandbox-build-go1.15 sandbox-go1.15 sandbox-test-go1.15 sandbox-build-go1.16 \
446-
sandbox-go1.16 sandbox-test-go1.16 sandbox-build-gotip sandbox-gotip sandbox-test-gotip update-aws-golang-tip
447-
448-
sandbox-tests: sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-gotip
449-
450-
sandbox-build-go1.15:
451-
docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.15 -t "aws-sdk-go-v2-1.15" .
452-
sandbox-go1.15: sandbox-build-go1.15
453-
docker run -i -t aws-sdk-go-v2-1.15 bash
454-
sandbox-test-go1.15: sandbox-build-go1.15
455-
docker run -t aws-sdk-go-v2-1.15
456-
457-
sandbox-build-go1.16:
458-
docker build -f ./internal/awstesting/sandbox/Dockerfile.test.go1.16 -t "aws-sdk-go-v2-1.16" .
459-
sandbox-go1.16: sandbox-build-go1.16
460-
docker run -i -t aws-sdk-go-v2-1.16 bash
461-
sandbox-test-go1.16: sandbox-build-go1.16
462-
docker run -t aws-sdk-go-v2-1.16
463-
464-
sandbox-build-gotip:
465-
@echo "Run make update-aws-golang-tip, if this test fails because missing aws-golang:tip container"
466-
docker build -f ./internal/awstesting/sandbox/Dockerfile.test.gotip -t "aws-sdk-go-v2-tip" .
467-
sandbox-gotip: sandbox-build-gotip
468-
docker run -i -t aws-sdk-go-v2-tip bash
469-
sandbox-test-gotip: sandbox-build-gotip
470-
docker run -t aws-sdk-go-v2-tip
445+
.PHONY: sandbox-tests sandbox-build-% sandbox-run-% sandbox-test-% update-aws-golang-tip
446+
447+
sandbox-tests: sandbox-test-go1.15 sandbox-test-go1.16 sandbox-test-go1.17 sandbox-test-gotip
448+
449+
sandbox-build-%:
450+
@# sandbox-build-go1.17
451+
@# sandbox-build-gotip
452+
docker build \
453+
-f ./internal/awstesting/sandbox/Dockerfile.test.$(subst sandbox-build-,,$@) \
454+
-t "aws-sdk-go-$(subst sandbox-build-,,$@)" .
455+
sandbox-run-%: sandbox-build-%
456+
@# sandbox-run-go1.17
457+
@# sandbox-run-gotip
458+
docker run -i -t "aws-sdk-go-$(subst sandbox-run-,,$@)" bash
459+
sandbox-test-%: sandbox-build-%
460+
@# sandbox-test-go1.17
461+
@# sandbox-test-gotip
462+
docker run -t "aws-sdk-go-$(subst sandbox-test-,,$@)"
471463

472464
update-aws-golang-tip:
473465
docker build --no-cache=true -f ./internal/awstesting/sandbox/Dockerfile.golang-tip -t "aws-golang:tip" .

aws/generate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build ignore
12
// +build ignore
23

34
package main

aws/logging_generate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build clientlogmode
12
// +build clientlogmode
23

34
package main

aws/middleware/osname.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build go1.16
12
// +build go1.16
23

34
package middleware

aws/middleware/osname_go115.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !go1.16
12
// +build !go1.16
23

34
package middleware

config/codegen/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build codegen
12
// +build codegen
23

34
package main

config/shared_config_other_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !windows
12
// +build !windows
23

34
package config

0 commit comments

Comments
 (0)