diff --git a/.chloggen/go1-20.yaml b/.chloggen/go1-20.yaml new file mode 100755 index 00000000000..eb491169c39 --- /dev/null +++ b/.chloggen/go1-20.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: all + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove go 1.18 support, bump minimum to go 1.19 and add testing for 1.20 + +# One or more tracking issues or pull requests related to the change +issues: [7151] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7c38e7c555c..5a9a66b5431 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -109,7 +109,7 @@ jobs: unittest: strategy: matrix: - go-version: [1.19, 1.18] + go-version: ["1.20", 1.19] # 1.20 needs quotes otherwise it's interpreted as 1.2 runs-on: ubuntu-latest needs: [setup-environment] steps: diff --git a/Makefile.Common b/Makefile.Common index fabe0f2a339..9a28e0d2f99 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -59,7 +59,7 @@ fmt: $(GOIMPORTS) .PHONY: tidy tidy: rm -fr go.sum - $(GOCMD) mod tidy -compat=1.18 + $(GOCMD) mod tidy -compat=1.19 .PHONY: lint lint: $(LINT) diff --git a/cmd/builder/go.mod b/cmd/builder/go.mod index abe1dfe6c41..3fde04d1d94 100644 --- a/cmd/builder/go.mod +++ b/cmd/builder/go.mod @@ -14,7 +14,7 @@ module go.opentelemetry.io/collector/cmd/builder -go 1.18 +go 1.19 require ( github.com/knadh/koanf v1.5.0 diff --git a/cmd/builder/internal/builder/main.go b/cmd/builder/internal/builder/main.go index 3730efc4a25..d8cf0d3c9a3 100644 --- a/cmd/builder/internal/builder/main.go +++ b/cmd/builder/internal/builder/main.go @@ -119,7 +119,7 @@ func GetModules(cfg Config) error { } // #nosec G204 -- cfg.Distribution.Go is trusted to be a safe path - cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.18") + cmd := exec.Command(cfg.Distribution.Go, "mod", "tidy", "-compat=1.19") cmd.Dir = cfg.Distribution.OutputPath if out, err := cmd.CombinedOutput(); err != nil { return fmt.Errorf("failed to update go.mod: %w. Output:\n%s", err, out) diff --git a/cmd/builder/internal/builder/templates/go.mod.tmpl b/cmd/builder/internal/builder/templates/go.mod.tmpl index d0b53944a73..b2c3acfc9e7 100644 --- a/cmd/builder/internal/builder/templates/go.mod.tmpl +++ b/cmd/builder/internal/builder/templates/go.mod.tmpl @@ -2,7 +2,7 @@ module {{.Distribution.Module}} -go 1.18 +go 1.19 require ( {{- range .Connectors}} diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index a8097d9e8c6..626646e58e6 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -2,7 +2,7 @@ module go.opentelemetry.io/collector/cmd/otelcorecol -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/component/go.mod b/component/go.mod index 06d0e8fc578..d178ddb54cc 100644 --- a/component/go.mod +++ b/component/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/component -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/confmap/go.mod b/confmap/go.mod index b517eb65bcb..078f8d05328 100644 --- a/confmap/go.mod +++ b/confmap/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/confmap -go 1.18 +go 1.19 require ( github.com/knadh/koanf v1.5.0 diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index fa5d559015e..fb24da420bd 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/connector/forwardconnector -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/consumer/go.mod b/consumer/go.mod index 67af9bac384..e56b3600b19 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/consumer -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index 5d7129f35b9..695e2a8d864 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/exporter/loggingexporter -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index 9a8faa160d5..489d90933f0 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/exporter/otlpexporter -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 88a0e3325c7..256a14bbae1 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/exporter/otlphttpexporter -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index bbc208b1612..85dd3a8f613 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/extension/ballastextension -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index e2547d550ad..75d69c38180 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/extension/zpagesextension -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/featuregate/go.mod b/featuregate/go.mod index 537926fb44f..3a8d6a3d6cd 100644 --- a/featuregate/go.mod +++ b/featuregate/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/featuregate -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/go.mod b/go.mod index 91200ba75a5..de5c7ec057e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector -go 1.18 +go 1.19 require ( contrib.go.opencensus.io/exporter/prometheus v0.4.2 diff --git a/internal/tools/go.mod b/internal/tools/go.mod index fc26c32b908..9914b263cd4 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/internal/tools -go 1.18 +go 1.19 require ( github.com/client9/misspell v0.3.4 diff --git a/pdata/go.mod b/pdata/go.mod index 26bd052749d..c450b94a0ae 100644 --- a/pdata/go.mod +++ b/pdata/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/pdata -go 1.18 +go 1.19 require ( github.com/gogo/protobuf v1.3.2 diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index f1c3efc1ee7..aaf01cf5f43 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/processor/batchprocessor -go 1.18 +go 1.19 require ( contrib.go.opencensus.io/exporter/prometheus v0.4.2 diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 3ccb8f28323..d16873c5316 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/processor/memorylimiterprocessor -go 1.18 +go 1.19 require ( github.com/stretchr/testify v1.8.1 diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index 5a695e1b150..d858b9bc5d7 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/receiver/otlpreceiver -go 1.18 +go 1.19 require ( github.com/gogo/protobuf v1.3.2 diff --git a/semconv/go.mod b/semconv/go.mod index 0f5358cc783..74f0b2bd8fd 100644 --- a/semconv/go.mod +++ b/semconv/go.mod @@ -1,6 +1,6 @@ module go.opentelemetry.io/collector/semconv -go 1.18 +go 1.19 require github.com/stretchr/testify v1.8.1