Skip to content

Commit

Permalink
[cmd/configschema] deprecate configschema (#30190)
Browse files Browse the repository at this point in the history
**Description:**
Deprecate configschema

**Link to tracking Issue:**
See #30187

**Documentation:**
Deprecation notice added to functions, packages and READMEs.
  • Loading branch information
atoulme authored Jan 5, 2024
1 parent 5ef17c0 commit ec5fa31
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .chloggen/deprecate_configschema.yaml
Original file line number Diff line number Diff line change
@@ -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: []
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,6 @@ issues:
- text: "G402:"
linters:
- gosec
- text: "SA1019: \"github.com/open-telemetry/opentelemetry-collector-contrib/cmd/configschema"
linters:
- staticcheck
3 changes: 3 additions & 0 deletions cmd/configschema/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions cmd/configschema/cfgmetadatagen/cfgmetadatagen/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions cmd/configschema/cfgmetadatagen/cfgmetadatagen/cli.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions cmd/configschema/cfgmetadatagen/main.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -14,6 +16,7 @@ import (
)

func main() {

sourceDir, outputDir := getFlags()
c, err := components.Components()
if err != nil {
Expand Down
2 changes: 2 additions & 0 deletions cmd/configschema/comments.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
3 changes: 3 additions & 0 deletions cmd/configschema/docsgen/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions cmd/configschema/docsgen/docsgen/cli.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions cmd/configschema/docsgen/main.go
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down
2 changes: 2 additions & 0 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit ec5fa31

Please sign in to comment.