From bd9f523bf88f8db41e944c266d5d17ab33c2dee2 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Thu, 15 Jun 2023 11:16:50 -0700 Subject: [PATCH] Split config/confignet into its own module Linked issue #7895 Signed-off-by: Alex Boten --- .chloggen/codeboten_split-config-mod-net.yaml | 16 ++++++++++++++++ .github/dependabot.yml | 5 +++++ cmd/builder/test/core.builder.yaml | 7 +++++++ cmd/otelcorecol/builder-config.yaml | 7 +++++++ cmd/otelcorecol/go.mod | 3 +++ component/go.mod | 2 ++ config/confignet/Makefile | 1 + config/confignet/go.mod | 11 +++++++++++ config/confignet/go.sum | 10 ++++++++++ connector/forwardconnector/go.mod | 2 ++ connector/go.mod | 2 ++ consumer/go.mod | 2 ++ exporter/go.mod | 2 ++ exporter/loggingexporter/go.mod | 2 ++ exporter/otlpexporter/go.mod | 3 +++ exporter/otlphttpexporter/go.mod | 3 +++ extension/auth/go.mod | 2 ++ extension/ballastextension/go.mod | 2 ++ extension/go.mod | 2 ++ extension/zpagesextension/go.mod | 7 +++++-- go.mod | 3 +++ processor/batchprocessor/go.mod | 2 ++ processor/go.mod | 2 ++ processor/memorylimiterprocessor/go.mod | 2 ++ receiver/go.mod | 2 ++ receiver/otlpreceiver/go.mod | 3 +++ versions.yaml | 7 +++++++ 27 files changed, 110 insertions(+), 2 deletions(-) create mode 100755 .chloggen/codeboten_split-config-mod-net.yaml create mode 100644 config/confignet/Makefile create mode 100644 config/confignet/go.mod create mode 100644 config/confignet/go.sum diff --git a/.chloggen/codeboten_split-config-mod-net.yaml b/.chloggen/codeboten_split-config-mod-net.yaml new file mode 100755 index 000000000000..9d8e9b9c239a --- /dev/null +++ b/.chloggen/codeboten_split-config-mod-net.yaml @@ -0,0 +1,16 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: confignet + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Split config/confignet into its own module + +# One or more tracking issues or pull requests related to the change +issues: [7895] + +# (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/dependabot.yml b/.github/dependabot.yml index d2f6e8fb798c..ce540946bdf4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -32,6 +32,11 @@ updates: schedule: interval: "weekly" day: "wednesday" + - package-ecosystem: "gomod" + directory: "/config/confignet" + schedule: + interval: "weekly" + day: "wednesday" - package-ecosystem: "gomod" directory: "/confmap" schedule: diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 65d6790424de..2fbf2de6ce09 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -20,7 +20,14 @@ exporters: replaces: - go.opentelemetry.io/collector => ${WORKSPACE_DIR} - go.opentelemetry.io/collector/component => ${WORKSPACE_DIR}/component + # - go.opentelemetry.io/collector/config/configauth => ${WORKSPACE_DIR}/config/configauth - go.opentelemetry.io/collector/config/configcompression => ${WORKSPACE_DIR}/config/configcompression + # - go.opentelemetry.io/collector/config/configgrpc => ${WORKSPACE_DIR}/config/configgrpc + # - go.opentelemetry.io/collector/config/confighttp => ${WORKSPACE_DIR}/config/confighttp + - go.opentelemetry.io/collector/config/confignet => ${WORKSPACE_DIR}/config/confignet + # - go.opentelemetry.io/collector/config/configopaque => ${WORKSPACE_DIR}/config/configopaque + # - go.opentelemetry.io/collector/config/configtelemetry => ${WORKSPACE_DIR}/config/configtelemetry + # - go.opentelemetry.io/collector/config/configtls => ${WORKSPACE_DIR}/config/configtls - go.opentelemetry.io/collector/confmap => ${WORKSPACE_DIR}/confmap - go.opentelemetry.io/collector/consumer => ${WORKSPACE_DIR}/consumer - go.opentelemetry.io/collector/connector => ${WORKSPACE_DIR}/connector diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index 163f5c10ad01..4d9758972751 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -23,7 +23,14 @@ connectors: replaces: - go.opentelemetry.io/collector => ../../ - go.opentelemetry.io/collector/component => ../../component + # - go.opentelemetry.io/collector/config/configauth => ../../config/configauth - go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + # - go.opentelemetry.io/collector/config/configgrpc => ../../config/configgrpc + # - go.opentelemetry.io/collector/config/confighttp => ../../config/confighttp + - go.opentelemetry.io/collector/config/confignet => ../../config/confignet + # - go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque + # - go.opentelemetry.io/collector/config/configtelemetry => ../../config/configtelemetry + # - go.opentelemetry.io/collector/config/configtls => ../../config/configtls - go.opentelemetry.io/collector/confmap => ../../confmap - go.opentelemetry.io/collector/consumer => ../../consumer - go.opentelemetry.io/collector/connector => ../../connector diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index 0aadd68875cd..bbaa3360c249 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -72,6 +72,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.3 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/config/configcompression v0.0.0-00010101000000-000000000000 // indirect + go.opentelemetry.io/collector/config/confignet v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/confmap v0.79.0 // indirect go.opentelemetry.io/collector/consumer v0.79.0 // indirect go.opentelemetry.io/collector/extension/auth v0.0.0-00010101000000-000000000000 // indirect @@ -108,6 +109,8 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet + replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/consumer => ../../consumer diff --git a/component/go.mod b/component/go.mod index 7b3617eea6c4..2cad89f4e4df 100644 --- a/component/go.mod +++ b/component/go.mod @@ -66,3 +66,5 @@ retract ( replace go.opentelemetry.io/collector/connector => ../connector replace go.opentelemetry.io/collector/config/configcompression => ../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../config/confignet diff --git a/config/confignet/Makefile b/config/confignet/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/config/confignet/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/config/confignet/go.mod b/config/confignet/go.mod new file mode 100644 index 000000000000..73b322ed1dbf --- /dev/null +++ b/config/confignet/go.mod @@ -0,0 +1,11 @@ +module go.opentelemetry.io/collector/config/confignet + +go 1.19 + +require github.com/stretchr/testify v1.8.4 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/config/confignet/go.sum b/config/confignet/go.sum new file mode 100644 index 000000000000..fa4b6e6825c4 --- /dev/null +++ b/config/confignet/go.sum @@ -0,0 +1,10 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/connector/forwardconnector/go.mod b/connector/forwardconnector/go.mod index 089925c6f550..9acb0a33d27d 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -74,3 +74,5 @@ retract ( replace go.opentelemetry.io/collector/extension/auth => ../../extension/auth replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet diff --git a/connector/go.mod b/connector/go.mod index f2b20ff3e9ee..780149604ff6 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -66,3 +66,5 @@ replace go.opentelemetry.io/collector/semconv => ../semconv replace go.opentelemetry.io/collector/exporter => ../exporter replace go.opentelemetry.io/collector/config/configcompression => ../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../config/confignet diff --git a/consumer/go.mod b/consumer/go.mod index 0ea38e8532f7..41b5135e58ed 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -59,3 +59,5 @@ retract ( replace go.opentelemetry.io/collector/connector => ../connector replace go.opentelemetry.io/collector/config/configcompression => ../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../config/confignet diff --git a/exporter/go.mod b/exporter/go.mod index d5fba5f63f3c..62dbfb8ffe97 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -91,3 +91,5 @@ retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module replace go.opentelemetry.io/collector/connector => ../connector replace go.opentelemetry.io/collector/config/configcompression => ../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../config/confignet diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index 69daa8b1f05f..02310f3f2f70 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -80,3 +80,5 @@ retract ( replace go.opentelemetry.io/collector/connector => ../../connector replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index 7dfe3c1520ce..13589e43fca3 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -37,6 +37,7 @@ require ( github.com/mostynb/go-grpc-compression v1.1.19 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/extension v0.0.0-20230609200026-525adf4a682a // indirect go.opentelemetry.io/collector/extension/auth v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/featuregate v1.0.0-rcv0012 // indirect @@ -62,6 +63,8 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet + replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/exporter => ../ diff --git a/exporter/otlphttpexporter/go.mod b/exporter/otlphttpexporter/go.mod index 61f0cff68ea9..c0d9b3901377 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -41,6 +41,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.9.0 // indirect go.opencensus.io v0.24.0 // indirect + go.opentelemetry.io/collector/config/confignet v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/extension v0.0.0-20230609200026-525adf4a682a // indirect go.opentelemetry.io/collector/extension/auth v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/featuregate v1.0.0-rcv0012 // indirect @@ -65,6 +66,8 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet + replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/exporter => ../ diff --git a/extension/auth/go.mod b/extension/auth/go.mod index 9d4d33aa84dd..20f55f523dd4 100644 --- a/extension/auth/go.mod +++ b/extension/auth/go.mod @@ -63,3 +63,5 @@ replace go.opentelemetry.io/collector/semconv => ../../semconv replace go.opentelemetry.io/collector/connector => ../../connector replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index 8d92c939e259..caf695848551 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -77,3 +77,5 @@ replace go.opentelemetry.io/collector/processor => ../../processor replace go.opentelemetry.io/collector/connector => ../../connector replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet diff --git a/extension/go.mod b/extension/go.mod index c579bf04edf6..556aee3b3079 100644 --- a/extension/go.mod +++ b/extension/go.mod @@ -62,3 +62,5 @@ replace go.opentelemetry.io/collector/exporter => ../exporter replace go.opentelemetry.io/collector/connector => ../connector replace go.opentelemetry.io/collector/config/configcompression => ../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../config/confignet diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 4d12e4fa9002..4d185112ea03 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -6,6 +6,7 @@ require ( github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector v0.79.0 go.opentelemetry.io/collector/component v0.79.0 + go.opentelemetry.io/collector/config/confignet v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/confmap v0.79.0 go.opentelemetry.io/collector/extension v0.0.0-20230609200026-525adf4a682a go.opentelemetry.io/contrib/zpages v0.42.0 @@ -44,6 +45,10 @@ replace go.opentelemetry.io/collector => ../../ replace go.opentelemetry.io/collector/component => ../../component +replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet + replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/exporter => ../../exporter @@ -70,5 +75,3 @@ retract ( ) replace go.opentelemetry.io/collector/connector => ../../connector - -replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression diff --git a/go.mod b/go.mod index e9ede7d8e22d..5179d2cc5b16 100644 --- a/go.mod +++ b/go.mod @@ -19,6 +19,7 @@ require ( go.opencensus.io v0.24.0 go.opentelemetry.io/collector/component v0.79.0 go.opentelemetry.io/collector/config/configcompression v0.0.0-00010101000000-000000000000 + go.opentelemetry.io/collector/config/confignet v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/confmap v0.79.0 go.opentelemetry.io/collector/connector v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/consumer v0.79.0 @@ -98,6 +99,8 @@ replace go.opentelemetry.io/collector/confmap => ./confmap replace go.opentelemetry.io/collector/config/configcompression => ./config/configcompression +replace go.opentelemetry.io/collector/config/confignet => ./config/confignet + replace go.opentelemetry.io/collector/connector => ./connector replace go.opentelemetry.io/collector/consumer => ./consumer diff --git a/processor/batchprocessor/go.mod b/processor/batchprocessor/go.mod index 2e78bc666198..e6962d5e0c13 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -95,3 +95,5 @@ retract ( replace go.opentelemetry.io/collector/connector => ../../connector replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet diff --git a/processor/go.mod b/processor/go.mod index 3481535339ac..d2a8980974c5 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -67,3 +67,5 @@ replace go.opentelemetry.io/collector/semconv => ../semconv replace go.opentelemetry.io/collector/connector => ../connector replace go.opentelemetry.io/collector/config/configcompression => ../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../config/confignet diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 2d70d4d35274..86d042c4aecd 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -84,3 +84,5 @@ retract ( replace go.opentelemetry.io/collector/connector => ../../connector replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet diff --git a/receiver/go.mod b/receiver/go.mod index 85533dc91a2c..ae00c73298ae 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -89,3 +89,5 @@ retract v0.76.0 // Depends on retracted pdata v1.0.0-rc10 module replace go.opentelemetry.io/collector/connector => ../connector replace go.opentelemetry.io/collector/config/configcompression => ../config/configcompression + +replace go.opentelemetry.io/collector/config/confignet => ../config/confignet diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index f58db722ca94..bf8318569696 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -7,6 +7,7 @@ require ( github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector v0.79.0 go.opentelemetry.io/collector/component v0.79.0 + go.opentelemetry.io/collector/config/confignet v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/confmap v0.79.0 go.opentelemetry.io/collector/consumer v0.79.0 go.opentelemetry.io/collector/pdata v1.0.0-rcv0012 @@ -80,6 +81,8 @@ replace go.opentelemetry.io/collector/component => ../../component replace go.opentelemetry.io/collector/config/configcompression => ../../config/configcompression +replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet + replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/exporter => ../../exporter diff --git a/versions.yaml b/versions.yaml index e2393fbf5a50..fc359ca3e64b 100644 --- a/versions.yaml +++ b/versions.yaml @@ -14,7 +14,14 @@ module-sets: - go.opentelemetry.io/collector/cmd/builder - go.opentelemetry.io/collector/component - go.opentelemetry.io/collector/confmap + # - go.opentelemetry.io/collector/config/configauth - go.opentelemetry.io/collector/config/configcompression + # - go.opentelemetry.io/collector/config/configgrpc + # - go.opentelemetry.io/collector/config/confighttp + - go.opentelemetry.io/collector/config/confignet + # - go.opentelemetry.io/collector/config/configopaque + # - go.opentelemetry.io/collector/config/configtelemetry + # - go.opentelemetry.io/collector/config/configtls - go.opentelemetry.io/collector/connector - go.opentelemetry.io/collector/connector/forwardconnector - go.opentelemetry.io/collector/consumer