From 084a64ec6898d0ecb4cf1217f0d9be1e73b9c762 Mon Sep 17 00:00:00 2001 From: Alex Boten Date: Fri, 16 Jun 2023 11:50:11 -0700 Subject: [PATCH] split config/configopaque into its own module (#7906) Part of #7895 --------- Signed-off-by: Alex Boten --- .chloggen/codeboten_split-config-mod-opaque.yaml | 16 ++++++++++++++++ .github/dependabot.yml | 5 +++++ Makefile | 2 ++ cmd/builder/test/core.builder.yaml | 2 +- cmd/otelcorecol/builder-config.yaml | 2 +- cmd/otelcorecol/go.mod | 3 +++ component/go.mod | 2 ++ config/configopaque/Makefile | 1 + config/configopaque/go.mod | 13 +++++++++++++ config/configopaque/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 | 2 ++ 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 | 2 +- 28 files changed, 93 insertions(+), 3 deletions(-) create mode 100755 .chloggen/codeboten_split-config-mod-opaque.yaml create mode 100644 config/configopaque/Makefile create mode 100644 config/configopaque/go.mod create mode 100644 config/configopaque/go.sum diff --git a/.chloggen/codeboten_split-config-mod-opaque.yaml b/.chloggen/codeboten_split-config-mod-opaque.yaml new file mode 100755 index 00000000000..9ff155037eb --- /dev/null +++ b/.chloggen/codeboten_split-config-mod-opaque.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: configopaque + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Split config/configopaque 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 ce540946bdf..1a1edc41cbe 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -37,6 +37,11 @@ updates: schedule: interval: "weekly" day: "wednesday" + - package-ecosystem: "gomod" + directory: "/config/configopaque" + schedule: + interval: "weekly" + day: "wednesday" - package-ecosystem: "gomod" directory: "/confmap" schedule: diff --git a/Makefile b/Makefile index b9765b5f380..46fd72b2eae 100644 --- a/Makefile +++ b/Makefile @@ -276,6 +276,7 @@ check-contrib: @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/component=$(CURDIR)/component" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configcompression=$(CURDIR)/config/configcompression" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/confignet=$(CURDIR)/config/confignet" + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/config/configopaque=$(CURDIR)/config/configopaque" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/confmap=$(CURDIR)/confmap" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/consumer=$(CURDIR)/consumer" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -replace go.opentelemetry.io/collector/exporter=$(CURDIR)/exporter" @@ -308,6 +309,7 @@ restore-contrib: @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/component" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/configcompression" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/confignet" + @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/config/configopaque" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/confmap" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/consumer" @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit -dropreplace go.opentelemetry.io/collector/exporter" diff --git a/cmd/builder/test/core.builder.yaml b/cmd/builder/test/core.builder.yaml index 2fbf2de6ce0..004e3c7fcb1 100644 --- a/cmd/builder/test/core.builder.yaml +++ b/cmd/builder/test/core.builder.yaml @@ -25,7 +25,7 @@ replaces: # - 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/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 diff --git a/cmd/otelcorecol/builder-config.yaml b/cmd/otelcorecol/builder-config.yaml index 4d975897275..c834b0a3128 100644 --- a/cmd/otelcorecol/builder-config.yaml +++ b/cmd/otelcorecol/builder-config.yaml @@ -28,7 +28,7 @@ replaces: # - 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/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 diff --git a/cmd/otelcorecol/go.mod b/cmd/otelcorecol/go.mod index cee296d037d..6d97d299fc4 100644 --- a/cmd/otelcorecol/go.mod +++ b/cmd/otelcorecol/go.mod @@ -73,6 +73,7 @@ require ( 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/config/configopaque 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-20230615165320-df20186ee21c // indirect @@ -111,6 +112,8 @@ replace go.opentelemetry.io/collector/config/configcompression => ../../config/c replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque + 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 2cad89f4e4d..d653421c253 100644 --- a/component/go.mod +++ b/component/go.mod @@ -68,3 +68,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque diff --git a/config/configopaque/Makefile b/config/configopaque/Makefile new file mode 100644 index 00000000000..ded7a36092d --- /dev/null +++ b/config/configopaque/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/config/configopaque/go.mod b/config/configopaque/go.mod new file mode 100644 index 00000000000..582e6a19dea --- /dev/null +++ b/config/configopaque/go.mod @@ -0,0 +1,13 @@ +module go.opentelemetry.io/collector/config/configopaque + +go 1.19 + +require ( + github.com/stretchr/testify v1.8.4 + gopkg.in/yaml.v3 v3.0.1 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect +) diff --git a/config/configopaque/go.sum b/config/configopaque/go.sum new file mode 100644 index 00000000000..fa4b6e6825c --- /dev/null +++ b/config/configopaque/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 374cdf56b95..459cf5c179c 100644 --- a/connector/forwardconnector/go.mod +++ b/connector/forwardconnector/go.mod @@ -76,3 +76,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque diff --git a/connector/go.mod b/connector/go.mod index 780149604ff..3ab327132bd 100644 --- a/connector/go.mod +++ b/connector/go.mod @@ -68,3 +68,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque diff --git a/consumer/go.mod b/consumer/go.mod index 41b5135e58e..ccdaafd1a6b 100644 --- a/consumer/go.mod +++ b/consumer/go.mod @@ -61,3 +61,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque diff --git a/exporter/go.mod b/exporter/go.mod index 62dbfb8ffe9..1361f18e86f 100644 --- a/exporter/go.mod +++ b/exporter/go.mod @@ -93,3 +93,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque diff --git a/exporter/loggingexporter/go.mod b/exporter/loggingexporter/go.mod index 02310f3f2f7..5dc7ee6bdca 100644 --- a/exporter/loggingexporter/go.mod +++ b/exporter/loggingexporter/go.mod @@ -82,3 +82,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque diff --git a/exporter/otlpexporter/go.mod b/exporter/otlpexporter/go.mod index 3be6c1093dc..267bd003ea2 100644 --- a/exporter/otlpexporter/go.mod +++ b/exporter/otlpexporter/go.mod @@ -7,6 +7,7 @@ require ( go.opentelemetry.io/collector v0.79.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/configopaque 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/exporter v0.79.0 @@ -65,6 +66,8 @@ replace go.opentelemetry.io/collector/config/configcompression => ../../config/c replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque + 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 26b5aa36264..6812f834895 100644 --- a/exporter/otlphttpexporter/go.mod +++ b/exporter/otlphttpexporter/go.mod @@ -7,6 +7,7 @@ require ( go.opentelemetry.io/collector v0.79.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/configopaque 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/exporter v0.79.0 @@ -68,6 +69,8 @@ replace go.opentelemetry.io/collector/config/configcompression => ../../config/c replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque + 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 20f55f523dd..c24e379db68 100644 --- a/extension/auth/go.mod +++ b/extension/auth/go.mod @@ -65,3 +65,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque diff --git a/extension/ballastextension/go.mod b/extension/ballastextension/go.mod index caf69584855..f5b03aa02ba 100644 --- a/extension/ballastextension/go.mod +++ b/extension/ballastextension/go.mod @@ -79,3 +79,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque diff --git a/extension/go.mod b/extension/go.mod index 556aee3b307..8d39f930262 100644 --- a/extension/go.mod +++ b/extension/go.mod @@ -64,3 +64,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque diff --git a/extension/zpagesextension/go.mod b/extension/zpagesextension/go.mod index 4d185112ea0..f3474c0f7bd 100644 --- a/extension/zpagesextension/go.mod +++ b/extension/zpagesextension/go.mod @@ -75,3 +75,5 @@ retract ( ) replace go.opentelemetry.io/collector/connector => ../../connector + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque diff --git a/go.mod b/go.mod index 6ab064d0a47..aee7718ce00 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( 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/config/configopaque v0.0.0-00010101000000-000000000000 go.opentelemetry.io/collector/confmap v0.79.0 go.opentelemetry.io/collector/connector v0.0.0-20230615165320-df20186ee21c go.opentelemetry.io/collector/consumer v0.79.0 @@ -101,6 +102,8 @@ replace go.opentelemetry.io/collector/config/configcompression => ./config/confi replace go.opentelemetry.io/collector/config/confignet => ./config/confignet +replace go.opentelemetry.io/collector/config/configopaque => ./config/configopaque + 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 e6962d5e0c1..418a541e7f8 100644 --- a/processor/batchprocessor/go.mod +++ b/processor/batchprocessor/go.mod @@ -97,3 +97,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque diff --git a/processor/go.mod b/processor/go.mod index d2a8980974c..53b6c013dd7 100644 --- a/processor/go.mod +++ b/processor/go.mod @@ -69,3 +69,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque diff --git a/processor/memorylimiterprocessor/go.mod b/processor/memorylimiterprocessor/go.mod index 86d042c4aec..22c2959c2c8 100644 --- a/processor/memorylimiterprocessor/go.mod +++ b/processor/memorylimiterprocessor/go.mod @@ -86,3 +86,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque diff --git a/receiver/go.mod b/receiver/go.mod index ae00c73298a..7c78ea5fd23 100644 --- a/receiver/go.mod +++ b/receiver/go.mod @@ -91,3 +91,5 @@ 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 + +replace go.opentelemetry.io/collector/config/configopaque => ../config/configopaque diff --git a/receiver/otlpreceiver/go.mod b/receiver/otlpreceiver/go.mod index 288276acb57..f34c497f2c3 100644 --- a/receiver/otlpreceiver/go.mod +++ b/receiver/otlpreceiver/go.mod @@ -53,6 +53,7 @@ require ( github.com/rs/cors v1.9.0 // 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/configopaque v0.0.0-00010101000000-000000000000 // indirect go.opentelemetry.io/collector/exporter v0.79.0 // indirect go.opentelemetry.io/collector/extension v0.0.0-20230609200026-525adf4a682a // indirect go.opentelemetry.io/collector/extension/auth v0.0.0-20230615165320-df20186ee21c // indirect @@ -83,6 +84,8 @@ replace go.opentelemetry.io/collector/config/configcompression => ../../config/c replace go.opentelemetry.io/collector/config/confignet => ../../config/confignet +replace go.opentelemetry.io/collector/config/configopaque => ../../config/configopaque + replace go.opentelemetry.io/collector/confmap => ../../confmap replace go.opentelemetry.io/collector/exporter => ../../exporter diff --git a/versions.yaml b/versions.yaml index fc359ca3e64..ae1542aba50 100644 --- a/versions.yaml +++ b/versions.yaml @@ -19,7 +19,7 @@ module-sets: # - 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/configopaque # - go.opentelemetry.io/collector/config/configtelemetry # - go.opentelemetry.io/collector/config/configtls - go.opentelemetry.io/collector/connector