Skip to content

Commit

Permalink
Upgrade to Go 1.17 (open-telemetry#3887)
Browse files Browse the repository at this point in the history
  • Loading branch information
emaderer authored Aug 25, 2021
1 parent 0fb771a commit 2116719
Show file tree
Hide file tree
Showing 39 changed files with 295 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ orbs:
executors:
golang:
docker:
- image: cimg/go:1.16
- image: cimg/go:1.17

commands:
verify_dist_files_exist:
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:

publish-check:
docker:
- image: cimg/go:1.16
- image: cimg/go:1.17
steps:
- attach_to_workspace
- setup_remote_docker
Expand All @@ -236,7 +236,7 @@ jobs:

publish-stable:
docker:
- image: cimg/go:1.16
- image: cimg/go:1.17
steps:
- attach_to_workspace
- verify_dist_files_exist
Expand All @@ -257,7 +257,7 @@ jobs:

publish-dev:
docker:
- image: cimg/go:1.16
- image: cimg/go:1.17
steps:
- attach_to_workspace
- verify_dist_files_exist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/api-compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17

- name: Install-Tools
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17
- name: Setup Go Environment
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Go
uses: actions/[email protected]
with:
go-version: 1.16
go-version: 1.17

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/contrib-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
contrib_tests:
runs-on: ubuntu-latest
container:
image: cimg/go:1.16
image: cimg/go:1.17
steps:
- name: Setup Permissions
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
ref: ${{ github.head_ref }}
- uses: actions/setup-go@v2
with:
go-version: '^1.16.0'
go-version: '^1.17.0'
- uses: evantorrie/mott-the-tidier@v1-beta
id: modtidy
with:
Expand Down
9 changes: 2 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ section of general project contributing guide.
Working with the project sources requires the following tools:

1. [git](https://git-scm.com/)
2. [go](https://golang.org/) (version 1.16 and up)
2. [go](https://golang.org/) (version 1.17 and up)
3. [make](https://www.gnu.org/software/make/)
4. [docker](https://www.docker.com/)

Expand Down Expand Up @@ -152,7 +152,7 @@ $ git push fork feature

## General Notes

This project uses Go 1.16.* and CircleCI.
This project uses Go 1.17.* and CircleCI.

CircleCI uses the Makefile with the `ci` target, it is recommended to
run it before submitting your PR. It runs `gofmt -s` (simplify) and `golint`.
Expand Down Expand Up @@ -289,11 +289,6 @@ do not decrease overall code coverage of the codebase - this is aligned with our
goal to increase coverage over time. Keep track of execution time for your unit
tests and try to keep them as short as possible.

## End-to-end Tests

If you implement a new component add end-to-end tests for the component using
the automated [Testbed](testbed/README.md).

## Release

See [release](docs/release.md) for details.
Expand Down
8 changes: 7 additions & 1 deletion cmd/checkdoc/go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
module go.opentelemetry.io/collector/cmd/checkdoc

go 1.16
go 1.17

require github.com/stretchr/testify v1.7.0

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
11 changes: 10 additions & 1 deletion cmd/issuegenerator/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/cmd/issuegenerator

go 1.16
go 1.17

require (
github.com/google/go-github v17.0.0+incompatible
Expand All @@ -9,3 +9,12 @@ require (
go.uber.org/zap v1.19.0
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93
)

require (
github.com/golang/protobuf v1.4.2 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/protobuf v1.25.0 // indirect
)
12 changes: 11 additions & 1 deletion cmd/mdatagen/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/cmd/mdatagen

go 1.16
go 1.17

require (
github.com/go-playground/locales v0.14.0
Expand All @@ -9,3 +9,13 @@ require (
github.com/stretchr/testify v1.7.0
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069 // indirect
golang.org/x/text v0.3.6 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
1 change: 1 addition & 0 deletions cmd/otelcol/main_others.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !windows
// +build !windows

package main
Expand Down
1 change: 1 addition & 0 deletions cmd/otelcol/main_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build windows
// +build windows

package main
Expand Down
2 changes: 1 addition & 1 deletion examples/demo/client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.16
FROM golang:1.17
COPY . /usr/src/client/
WORKDIR /usr/src/client/
RUN go env -w GOPROXY=direct
Expand Down
17 changes: 16 additions & 1 deletion examples/demo/client/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/examples/demo/client

go 1.16
go 1.17

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -17,3 +17,18 @@ require (
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece // indirect
google.golang.org/grpc v1.39.0
)

require (
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
go.opentelemetry.io/contrib v0.21.0 // indirect
go.opentelemetry.io/otel/internal/metric v0.22.0 // indirect
go.opentelemetry.io/otel/sdk/export/metric v0.22.0 // indirect
go.opentelemetry.io/otel/trace v1.0.0-RC1 // indirect
go.opentelemetry.io/proto/otlp v0.9.0 // indirect
golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
golang.org/x/text v0.3.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
)
2 changes: 1 addition & 1 deletion examples/demo/server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM golang:1.16
FROM golang:1.17
COPY . /usr/src/server/
WORKDIR /usr/src/server/
RUN go env -w GOPROXY=direct
Expand Down
16 changes: 15 additions & 1 deletion examples/demo/server/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/examples/demo/server

go 1.16
go 1.17

require (
github.com/davecgh/go-spew v1.1.1 // indirect
Expand All @@ -18,3 +18,17 @@ require (
google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece // indirect
google.golang.org/grpc v1.39.0
)

require (
github.com/cenkalti/backoff/v4 v4.1.1 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
go.opentelemetry.io/contrib v0.21.0 // indirect
go.opentelemetry.io/otel/internal/metric v0.22.0 // indirect
go.opentelemetry.io/otel/sdk/export/metric v0.22.0 // indirect
go.opentelemetry.io/proto/otlp v0.9.0 // indirect
golang.org/x/net v0.0.0-20200822124328-c89045814202 // indirect
golang.org/x/text v0.3.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
)
1 change: 1 addition & 0 deletions exporter/loggingexporter/known_sync_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build !windows
// +build !windows

package loggingexporter
Expand Down
1 change: 1 addition & 0 deletions exporter/loggingexporter/known_sync_error_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

//go:build windows
// +build windows

package loggingexporter
Expand Down
37 changes: 33 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
module go.opentelemetry.io/collector

go 1.16
go 1.17

require (
cloud.google.com/go v0.83.0 // indirect
contrib.go.opencensus.io/exporter/prometheus v0.3.0
github.com/StackExchange/wmi v1.2.1 // indirect
github.com/antonmedv/expr v1.9.0
github.com/cenkalti/backoff/v4 v4.1.1
github.com/census-instrumentation/opencensus-proto v0.3.0
github.com/fatih/structtag v1.2.0
github.com/gogo/protobuf v1.3.2
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/google/uuid v1.3.0
github.com/gorilla/mux v1.8.0
github.com/jaegertracing/jaeger v1.25.0
github.com/knadh/koanf v1.2.1
github.com/leoluk/perflib_exporter v0.1.0
github.com/magiconair/properties v1.8.5
github.com/mitchellh/mapstructure v1.4.1
github.com/prometheus/common v0.30.0
Expand Down Expand Up @@ -47,6 +44,38 @@ require (
gopkg.in/yaml.v2 v2.4.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/felixge/httpsnoop v1.0.2 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-kit/log v0.1.0 // indirect
github.com/go-logfmt/logfmt v0.5.0 // indirect
github.com/go-ole/go-ole v1.2.5 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/tklauser/numcpus v0.2.2 // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
go.opentelemetry.io/contrib v0.22.0 // indirect
go.opentelemetry.io/otel/internal/metric v0.22.0 // indirect
go.opentelemetry.io/otel/metric v0.22.0 // indirect
go.uber.org/atomic v1.9.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20210614182718-04defd469f4e // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)

replace go.opentelemetry.io/collector/model => ./model

retract v0.32.0 // Contains incomplete metrics transition to proto 0.9.0, random components are not working.
Loading

0 comments on commit 2116719

Please sign in to comment.