Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update modules to go 1.18 #5795

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -27,6 +27,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