diff --git a/.chloggen/update_metadata_schema.yaml b/.chloggen/update_metadata_schema.yaml new file mode 100644 index 00000000000..7b2e2ac5ca3 --- /dev/null +++ b/.chloggen/update_metadata_schema.yaml @@ -0,0 +1,25 @@ +# Use this changelog template to create an entry for release notes. + +# 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: mdatagen + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Update metadata schema with new fields without enforcing them + +# One or more tracking issues or pull requests related to the change +issues: [12359] + +# (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: + +# 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/cmd/mdatagen/internal/status.go b/cmd/mdatagen/internal/status.go index c8a06c06a08..6f1f849d171 100644 --- a/cmd/mdatagen/internal/status.go +++ b/cmd/mdatagen/internal/status.go @@ -41,12 +41,20 @@ type Codeowners struct { } type Status struct { - Stability StabilityMap `mapstructure:"stability"` - Distributions []string `mapstructure:"distributions"` - Class string `mapstructure:"class"` - Warnings []string `mapstructure:"warnings"` - Codeowners *Codeowners `mapstructure:"codeowners"` - UnsupportedPlatforms []string `mapstructure:"unsupported_platforms"` + Stability StabilityMap `mapstructure:"stability"` + Distributions []string `mapstructure:"distributions"` + Class string `mapstructure:"class"` + Warnings []string `mapstructure:"warnings"` + Codeowners *Codeowners `mapstructure:"codeowners"` + UnsupportedPlatforms []string `mapstructure:"unsupported_platforms"` + Deprecation DeprecationMap `mapstructure:"deprecation"` +} + +type DeprecationMap map[string]DeprecationInfo + +type DeprecationInfo struct { + Date string `mapstructure:"date"` + Migration string `mapstructure:"migration"` } var validClasses = []string{ diff --git a/cmd/mdatagen/metadata-schema.yaml b/cmd/mdatagen/metadata-schema.yaml index d0ab413207f..aff35e5f9b4 100644 --- a/cmd/mdatagen/metadata-schema.yaml +++ b/cmd/mdatagen/metadata-schema.yaml @@ -22,6 +22,11 @@ status: stable: [] deprecated: [] unmaintained: [] + # [WIP] Will be a requirement for deprecated components: The deprecation information for the deprecated components + deprecation: + : + date: string + migration: string # Optional: The distributions that this component is bundled with (For example core or contrib). See statusdata.go for a list of common distros. distributions: [string] # Optional: A list of warnings that should be brought to the attention of users looking to use this component