Skip to content

Commit

Permalink
[cmd/mdatagen] add unsupported platforms to the README header (#9803)
Browse files Browse the repository at this point in the history
**Description:**
Add unsupported platforms to the README header

**Link to tracking Issue:**
Fixes #9794
  • Loading branch information
atoulme committed Mar 30, 2024
1 parent 4b5d68e commit b5ce283
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .chloggen/add_unsupported_platforms.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: Adds unsupported platforms to the README header

# One or more tracking issues or pull requests related to the change
issues: [9794]

# (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: []
3 changes: 3 additions & 0 deletions .github/workflows/check_links_config.json
Expand Up @@ -8,6 +8,9 @@
},
{
"pattern": "http(s)?://example.com"
},
{
"pattern": "#warnings"
}
],
"aliveStatusCodes": [429, 200],
Expand Down
22 changes: 22 additions & 0 deletions cmd/mdatagen/internal/samplereceiver/README.md
@@ -0,0 +1,22 @@
# Sample Receiver
This receiver is used for testing purposes to check the output of mdatagen.
<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [development]: logs |
| | [beta]: traces |
| | [stable]: metrics |
| Unsupported Platforms | freebsd, illumos |
| Distributions | [] |
| Warnings | [Any additional information that should be brought to the consumer's attention](#warnings) |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fsample%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fsample) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fsample%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fsample) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dmitryax](https://www.github.com/dmitryax) |

[development]: https://github.com/open-telemetry/opentelemetry-collector#development
[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
[stable]: https://github.com/open-telemetry/opentelemetry-collector#stable
<!-- end autogenerated section -->

## Warnings

This is where warnings are described.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cmd/mdatagen/internal/samplereceiver/metadata.yaml
Expand Up @@ -12,6 +12,7 @@ status:
beta: [traces]
stable: [metrics]
distributions: []
unsupported_platforms: [freebsd, illumos]
codeowners:
active: [dmitryax]
warnings:
Expand Down
3 changes: 2 additions & 1 deletion cmd/mdatagen/loader_test.go
Expand Up @@ -35,7 +35,8 @@ func TestLoadMetadata(t *testing.T) {
Codeowners: &Codeowners{
Active: []string{"dmitryax"},
},
Warnings: []string{"Any additional information that should be brought to the consumer's attention"},
Warnings: []string{"Any additional information that should be brought to the consumer's attention"},
UnsupportedPlatforms: []string{"freebsd", "illumos"},
},
ResourceAttributes: map[attributeName]attribute{
"string.resource.attr": {
Expand Down
3 changes: 3 additions & 0 deletions cmd/mdatagen/templates/readme.md.tmpl
Expand Up @@ -11,6 +11,9 @@
{{- $idx = inc $idx }}
{{- end }}
{{- end}}
{{- if .Status.UnsupportedPlatforms }}
| Unsupported Platforms | {{ stringsJoin .Status.UnsupportedPlatforms ", " }} |
{{- end }}
{{- if and (ne $class "cmd") (ne $class "pkg") }}
| Distributions | [{{ stringsJoin .Status.SortedDistributions "], [" }}] |
{{- end }}
Expand Down

0 comments on commit b5ce283

Please sign in to comment.