Skip to content

Commit

Permalink
update modules to go 1.18 (#5795)
Browse files Browse the repository at this point in the history
Updating to the minimum supported version and removing 1.17 build job.
  • Loading branch information
Alex Boten authored Aug 3, 2022
1 parent c80d1c9 commit e07de93
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18
- name: Cache Go
id: go-cache
uses: actions/cache@v3
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
unittest:
strategy:
matrix:
go-version: [1.19, 1.18, 1.17]
go-version: [1.19, 1.18]
runs-on: ubuntu-latest
needs: [setup-environment]
steps:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
- `component.WithTracesProcessor`
- `component.WithMetricsProcessor`
- `component.WithLogsProcessor`
- Update minimum go version to 1.18 (#5795)

### 🚩 Deprecations 🚩

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,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.17 and up)
2. [go](https://golang.org/) (version 1.18 and up)
3. [make](https://www.gnu.org/software/make/)
4. [docker](https://www.docker.com/)

Expand Down Expand Up @@ -205,7 +205,7 @@ before merging (but see above paragraph about writing good commit messages in th

## General Notes

This project uses Go 1.17.* and [Github Actions.](https://github.com/features/actions)
This project uses Go 1.18.* and [Github Actions.](https://github.com/features/actions)

It is recommended to run `make gofmt all` before submitting your PR

Expand Down
2 changes: 1 addition & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fmt:
.PHONY: tidy
tidy:
rm -fr go.sum
$(GOCMD) mod tidy -compat=1.17
$(GOCMD) mod tidy -compat=1.18

.PHONY: lint
lint:
Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

module go.opentelemetry.io/collector/cmd/builder

go 1.17
go 1.18

require (
github.com/knadh/koanf v1.4.2
Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/internal/builder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func Compile(cfg Config) error {
// GetModules retrieves the go modules, updating go.mod and go.sum in the process
func GetModules(cfg Config) error {
// #nosec G204
cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.17")
cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.18")
cmd.Dir = cfg.Distribution.OutputPath
if out, err := cmd.CombinedOutput(); err != nil {
return fmt.Errorf("failed to update go.mod: %w. Output: %q", err, out)
Expand Down
2 changes: 1 addition & 1 deletion cmd/builder/internal/builder/templates/go.mod.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module {{.Distribution.Module}}

go 1.17
go 1.18

require (
{{- range .Extensions}}
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcorecol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module go.opentelemetry.io/collector/cmd/otelcorecol

go 1.17
go 1.18

require (
github.com/stretchr/testify v1.8.0
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector

go 1.17
go 1.18

require (
contrib.go.opencensus.io/exporter/prometheus v0.4.1
Expand Down
2 changes: 1 addition & 1 deletion internal/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/internal/tools

go 1.17
go 1.18

require (
github.com/client9/misspell v0.3.4
Expand Down
2 changes: 1 addition & 1 deletion pdata/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/pdata

go 1.17
go 1.18

require (
github.com/gogo/protobuf v1.3.2
Expand Down
2 changes: 1 addition & 1 deletion semconv/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module go.opentelemetry.io/collector/semconv

go 1.17
go 1.18

require github.com/stretchr/testify v1.8.0

Expand Down

0 comments on commit e07de93

Please sign in to comment.