Skip to content

Commit d00f059

Browse files
authored
Standardize changelog component list (#13924)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds some code to generate the list of allowed components for `chloggen`. All tooling was already prepared previously so we just need to make use of the features. The PR also adds a CI check to validate the component label in all changelog entries. <!-- Issue number if applicable --> #### Link to tracking issue Fixes #13923 <!--Describe the documentation added.--> #### Documentation I added a readme file as a replacement for the code comments in `.chloggen/config.yaml` since those are removed during auto generation of the file. <!--Please delete paragraphs that you did not use before submitting.-->
1 parent 42eaa5e commit d00f059

12 files changed

+132
-31
lines changed

.chloggen/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
### Changelog folder
2+
3+
This repo uses `chloggen` to manage its changelog files. You can find the source code for the tool [here](https://github.com/open-telemetry/opentelemetry-go-build-tools/tree/main/chloggen).
4+
5+
Here is a quick explanation of the `config.yaml` file for chloggen:
6+
7+
```yaml
8+
# The directory that stores individual changelog entries.
9+
# Each entry is stored in a dedicated yaml file.
10+
# - 'chloggen new' will copy the 'template_yaml' to this directory as a new entry file.
11+
# - 'chloggen validate' will validate that all entry files are valid.
12+
# - 'chloggen update' will read and delete all entry files in this directory, and update 'changelog_md'.
13+
# Specify as relative path from root of repo.
14+
# (Optional) Default: .chloggen
15+
entries_dir: .chloggen
16+
17+
# This file is used as the input for individual changelog entries.
18+
# Specify as relative path from root of repo.
19+
# (Optional) Default: .chloggen/TEMPLATE.yaml
20+
template_yaml: .chloggen/TEMPLATE.yaml
21+
22+
summary_template: .chloggen/summary.tmpl
23+
24+
# The CHANGELOG file or files to which 'chloggen update' will write new entries
25+
# (Optional) Default filename: CHANGELOG.md
26+
change_logs:
27+
user: CHANGELOG.md
28+
api: CHANGELOG-API.md
29+
30+
# The default change_log or change_logs to which an entry should be added.
31+
# If 'change_logs' is specified in this file, and no value is specified for 'default_change_logs',
32+
# then 'change_logs' MUST be specified in every entry file.
33+
default_change_logs: [user]
34+
```

.chloggen/config.yaml

Lines changed: 50 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,53 @@
1-
# The directory that stores individual changelog entries.
2-
# Each entry is stored in a dedicated yaml file.
3-
# - 'chloggen new' will copy the 'template_yaml' to this directory as a new entry file.
4-
# - 'chloggen validate' will validate that all entry files are valid.
5-
# - 'chloggen update' will read and delete all entry files in this directory, and update 'changelog_md'.
6-
# Specify as relative path from root of repo.
7-
# (Optional) Default: .chloggen
1+
change_logs:
2+
api: CHANGELOG-API.md
3+
user: CHANGELOG.md
4+
default_change_logs:
5+
- user
86
entries_dir: .chloggen
9-
10-
# This file is used as the input for individual changelog entries.
11-
# Specify as relative path from root of repo.
12-
# (Optional) Default: .chloggen/TEMPLATE.yaml
137
template_yaml: .chloggen/TEMPLATE.yaml
14-
158
summary_template: .chloggen/summary.tmpl
16-
17-
# The CHANGELOG file or files to which 'chloggen update' will write new entries
18-
# (Optional) Default filename: CHANGELOG.md
19-
change_logs:
20-
user: CHANGELOG.md
21-
api: CHANGELOG-API.md
22-
23-
# The default change_log or change_logs to which an entry should be added.
24-
# If 'change_logs' is specified in this file, and no value is specified for 'default_change_logs',
25-
# then 'change_logs' MUST be specified in every entry file.
26-
default_change_logs: [user]
9+
components:
10+
- all
11+
- cmd/builder
12+
- cmd/mdatagen
13+
- connector/forward
14+
- connector/sample
15+
- consumer/xconsumer
16+
- docs/rfcs
17+
- exporter/debug
18+
- exporter/nop
19+
- exporter/otlp
20+
- exporter/otlphttp
21+
- extension/memory_limiter
22+
- extension/xextension
23+
- extension/xextension
24+
- extension/zpages
25+
- pdata/pprofile
26+
- pkg/confmap
27+
- pkg/exporterhelper
28+
- pkg/pdata
29+
- pkg/processorhelper
30+
- pkg/queuebatch
31+
- pkg/receiverhelper
32+
- pkg/scraper
33+
- pkg/scraperhelper
34+
- pkg/service
35+
- pkg/xconnector
36+
- pkg/xexporter
37+
- pkg/xexporterhelper
38+
- pkg/xprocessor
39+
- pkg/xreceiver
40+
- processor/batch
41+
- processor/memory_limiter
42+
- processor/sample
43+
- provider/env
44+
- provider/file
45+
- provider/http
46+
- provider/https
47+
- provider/yaml
48+
- receiver/nop
49+
- receiver/otlp
50+
- receiver/sample
51+
- receiver/sample
52+
- scraper/sample
53+
- service/graph

.chloggen/control-attribute-enabled.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
change_type: enhancement
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: mdatagen
7+
component: cmd/mdatagen
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
1010
note: Improve validation for resource attribute `enabled` field in metadata files

.chloggen/fix_cmd_mdata-gen-metrics.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
change_type: bug_fix
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: mdatagen
7+
component: cmd/mdatagen
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
1010
note: Fix mdatagen generated_metrics for connectors
@@ -22,4 +22,4 @@ subtext:
2222
# Include 'user' if the change is relevant to end users.
2323
# Include 'api' if there is a change to a library API.
2424
# Default: '[user]'
25-
change_logs: [api]
25+
change_logs: [api]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: all
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Changelog entries will now have their component field checked against a list of valid components.
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [13924]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: This will ensure a more standardized changelog format which makes it easier to parse.
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [user]

.chloggen/mx-psi_configoptional-1.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
change_type: enhancement
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: configoptional
7+
component: all
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
1010
note: Mark configoptional as stable

.chloggen/mx-psi_mark-configauth-as-1.0.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
change_type: enhancement
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: configauth
7+
component: all
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
1010
note: Mark configauth module as 1.0

.chloggen/mx-psi_remove-deprecated-symbols-exporterhelper.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
change_type: breaking
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: exporterhelper
7+
component: pkg/exporterhelper
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
1010
note: Remove all experimental symbols in exporterhelper

.chloggen/stable-use-custom-proto.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
change_type: enhancement
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: pdata
7+
component: pkg/pdata
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
1010
note: Mark featuregate pdata.useCustomProtoEncoding as stable

.chloggen/telemetry-tracesconfig-deprecated.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
change_type: deprecation
55

66
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7-
component: service
7+
component: all
88

99
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
1010
note: service/telemetry.TracesConfig is deprecated

0 commit comments

Comments
 (0)