diff --git a/.chloggen/deprecate_configschema.yaml b/.chloggen/deprecate_configschema.yaml new file mode 100755 index 000000000000..4ceb0f2a8fb4 --- /dev/null +++ b/.chloggen/deprecate_configschema.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: deprecation + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: configschema + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Deprecating configschema to prefer generating documentation as part of its metadata generation with mdatagen + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [30187] + +# (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: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.golangci.yml b/.golangci.yml index 8692ebe9e1ea..16fb19e4b5b3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -170,3 +170,6 @@ issues: - text: "G402:" linters: - gosec + - text: "SA1019: \"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema" + linters: + - staticcheck diff --git a/cmd/configschema/README.md b/cmd/configschema/README.md index 6031b2d628fd..16b99d0f2a93 100644 --- a/cmd/configschema/README.md +++ b/cmd/configschema/README.md @@ -1,3 +1,6 @@ +> Deprecated: [v0.92.0] This tool is deprecated and will be removed in a future release. +> See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 + # ConfigSchema API This package contains an API that can be used to introspect the configuration diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md index 5886f1b84193..c3bc43745f84 100644 --- a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md @@ -1,3 +1,6 @@ +> Deprecated: [v0.92.0] This tool is deprecated and will be removed in a future release. +> See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 + # Config Metadata YAML Generator (alpha) This CLI application creates a configuration metadata YAML file for each diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go index 426c3f7394a5..bf4142954d83 100644 --- a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package cfgmetadatagen import ( @@ -15,6 +17,8 @@ import ( // GenerateFiles is the entry point for cfgmetadatagen. Component factories are // passed in so it can be used by other distros. +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 func GenerateFiles(factories otelcol.Factories, sourceDir string, outputDir string) error { dr := configschema.NewDirResolver(sourceDir, configschema.DefaultModule) writer := newMetadataFileWriter(outputDir) diff --git a/cmd/configschema/cfgmetadatagen/main.go b/cmd/configschema/cfgmetadatagen/main.go index 3efc76ed03d5..e461b4fe7b05 100644 --- a/cmd/configschema/cfgmetadatagen/main.go +++ b/cmd/configschema/cfgmetadatagen/main.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package main import ( @@ -14,6 +16,7 @@ import ( ) func main() { + sourceDir, outputDir := getFlags() c, err := components.Components() if err != nil { diff --git a/cmd/configschema/comments.go b/cmd/configschema/comments.go index c42da8a3338b..773f04780a87 100644 --- a/cmd/configschema/comments.go +++ b/cmd/configschema/comments.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package configschema // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema" import ( diff --git a/cmd/configschema/docsgen/README.md b/cmd/configschema/docsgen/README.md index 61365fb696e4..7b342699d92c 100644 --- a/cmd/configschema/docsgen/README.md +++ b/cmd/configschema/docsgen/README.md @@ -1,3 +1,6 @@ +> Deprecated: [v0.92.0] This tool is deprecated and will be removed in a future release. +> See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 + # Docsgen CLI Tool This package contains a CLI tool that generates markdown files for collector diff --git a/cmd/configschema/docsgen/docsgen/cli.go b/cmd/configschema/docsgen/docsgen/cli.go index f50af0fe9d05..5c3069c804c9 100644 --- a/cmd/configschema/docsgen/docsgen/cli.go +++ b/cmd/configschema/docsgen/docsgen/cli.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package docsgen // import "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema/docsgen/docsgen" import ( @@ -23,6 +25,8 @@ const mdFileName = "config.md" // CLI is the entrypoint for this package's functionality. It handles command- // line arguments for the docsgen executable and produces config documentation // for the specified components. +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 func CLI(factories otelcol.Factories, dr configschema.DirResolver) { tableTmpl, err := tableTemplate() if err != nil { diff --git a/cmd/configschema/docsgen/main.go b/cmd/configschema/docsgen/main.go index 03eb1705523c..2d1495cccc84 100644 --- a/cmd/configschema/docsgen/main.go +++ b/cmd/configschema/docsgen/main.go @@ -1,6 +1,8 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 package main import ( diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 774ee249a0b1..077f13b757cd 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -1,3 +1,5 @@ +// Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. +// See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187 module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema go 1.20