Skip to content

Commit

Permalink
Bump to go1.17 (slackhq#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbrownus authored Oct 21, 2021
1 parent 97afe2e commit 32cd9a9
Show file tree
Hide file tree
Showing 31 changed files with 81 additions and 47 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/gofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2

- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-gofmt1.16-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-gofmt1.17-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-gofmt1.16-
${{ runner.os }}-gofmt1.17-
- name: Install goimports
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
name: Build Linux All
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -34,10 +34,10 @@ jobs:
name: Build Windows amd64
runs-on: windows-latest
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -58,10 +58,10 @@ jobs:
name: Build Darwin amd64
runs-on: macOS-latest
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17

- name: Checkout code
uses: actions/checkout@v2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2

- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go1.16-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go1.17-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go1.16-
${{ runner.os }}-go1.17-
- name: build
run: make bin-docker
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2

- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go1.16-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go1.17-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go1.16-
${{ runner.os }}-go1.17-
- name: Build
run: make all
Expand All @@ -51,21 +51,21 @@ jobs:
os: [windows-latest, macOS-latest]
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go 1.17
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.17
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2

- uses: actions/cache@v1
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go1.16-${{ hashFiles('**/go.sum') }}
key: ${{ runner.os }}-go1.17-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go1.16-
${{ runner.os }}-go1.17-
- name: Build nebula
run: go build ./cmd/nebula
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New config option `pki.disconnect_invalid` that will tear down tunnels when they become invalid (through expiry or
removal of root trust). Default is `false`. Note, this will not currently recognize if a remote has changed
certificates since the last handshake. (#370)

### Changed

- Build against go 1.17. (#553)

### Deprecated

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GOMINVERSION = 1.16
GOMINVERSION = 1.17
NEBULA_CMD_PATH = "./cmd/nebula"
GO111MODULE = on
export GO111MODULE
Expand Down
1 change: 1 addition & 0 deletions cmd/nebula-cert/ca_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/nebula-cert/sign_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/nebula-service/logs_generic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows

package main
Expand Down
1 change: 1 addition & 0 deletions control_tester.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build e2e_testing
// +build e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions e2e/handshakes_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build e2e_testing
// +build e2e_testing

package e2e
Expand Down
1 change: 1 addition & 0 deletions e2e/helpers_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build e2e_testing
// +build e2e_testing

package e2e
Expand Down
1 change: 1 addition & 0 deletions e2e/router/router.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build e2e_testing
// +build e2e_testing

package router
Expand Down
12 changes: 11 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/slackhq/nebula

go 1.16
go 1.17

require (
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239
Expand Down Expand Up @@ -33,3 +33,13 @@ require (
google.golang.org/protobuf v1.26.0
gopkg.in/yaml.v2 v2.2.7
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.7.0 // indirect
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
1 change: 1 addition & 0 deletions tun_android.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down
4 changes: 2 additions & 2 deletions tun_darwin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build !ios
// +build !e2e_testing
//go:build !ios && !e2e_testing
// +build !ios,!e2e_testing

package nebula

Expand Down
1 change: 1 addition & 0 deletions tun_freebsd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down
4 changes: 2 additions & 2 deletions tun_ios.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build ios
// +build !e2e_testing
//go:build ios && !e2e_testing
// +build ios,!e2e_testing

package nebula

Expand Down
4 changes: 2 additions & 2 deletions tun_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build !android
// +build !e2e_testing
//go:build !android && !e2e_testing
// +build !android,!e2e_testing

package nebula

Expand Down
1 change: 1 addition & 0 deletions tun_linux_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions tun_tester.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build e2e_testing
// +build e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions tun_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions udp_android.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions udp_darwin.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions udp_freebsd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions udp_generic.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build (!linux || android) && !e2e_testing
// +build !linux android
// +build !e2e_testing

Expand Down
4 changes: 2 additions & 2 deletions udp_linux.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build !android
// +build !e2e_testing
//go:build !android && !e2e_testing
// +build !android,!e2e_testing

package nebula

Expand Down
1 change: 1 addition & 0 deletions udp_linux_32.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && (386 || amd64p32 || arm || mips || mipsle) && !android && !e2e_testing
// +build linux
// +build 386 amd64p32 arm mips mipsle
// +build !android
Expand Down
1 change: 1 addition & 0 deletions udp_linux_64.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux && (amd64 || arm64 || ppc64 || ppc64le || mips64 || mips64le || s390x || riscv64) && !android && !e2e_testing
// +build linux
// +build amd64 arm64 ppc64 ppc64le mips64 mips64le s390x riscv64
// +build !android
Expand Down
1 change: 1 addition & 0 deletions udp_tester.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build e2e_testing
// +build e2e_testing

package nebula
Expand Down
1 change: 1 addition & 0 deletions udp_windows.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !e2e_testing
// +build !e2e_testing

package nebula
Expand Down

0 comments on commit 32cd9a9

Please sign in to comment.