Skip to content

Commit d316a95

Browse files
[extension/filestorage] enable feature gate extension.filestorage.replaceUnsafeCharacters (open-telemetry#30755)
**Description:** Moves the feature gate `extension.filestorage.replaceUnsafeCharacters` to Beta stage, which means it is now enabled by default. This is according to the schedule for this feature gate described in the File Storage extension's [README](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/v0.92.0/extension/storage/filestorage/README.md#extensionfilestoragereplaceunsafecharacters). **Link to tracking Issue:** - open-telemetry#3148 **Testing:** Updated tests to not require enabling of the feature gate. **Documentation:** Updated version in which feature gate was moved to Beta.
1 parent 0166328 commit d316a95

File tree

4 files changed

+31
-6
lines changed

4 files changed

+31
-6
lines changed
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
7+
component: extension/filestorage
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Replace path-unsafe characters in component names
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [3148]
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: |
19+
The feature gate `extension.filestorage.replaceUnsafeCharacters` is now enabled by default.
20+
See the File Storage extension's README for details.
21+
22+
# If your change doesn't affect end users or the exported elements of any package,
23+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
24+
# Optional: The change log or logs in which this entry should be included.
25+
# e.g. '[user]' or '[user, api]'
26+
# Include 'user' if the change is relevant to end users.
27+
# Include 'api' if there is a change to a library API.
28+
# Default: '[user]'
29+
change_logs: []

extension/storage/filestorage/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ For more details, see the following issues:
131131
The schedule for this feature gate is:
132132

133133
- Introduced in v0.87.0 (October 2023) as `alpha` - disabled by default.
134-
- Moved to `beta` in January 2024 - enabled by default.
134+
- Moved to `beta` in v0.92.0 (January 2024) - enabled by default.
135135
- Moved to `stable` in April 2024 - cannot be disabled.
136136
- Removed three releases after `stable`.
137137

extension/storage/filestorage/extension.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
var replaceUnsafeCharactersFeatureGate = featuregate.GlobalRegistry().MustRegister(
2020
"extension.filestorage.replaceUnsafeCharacters",
21-
featuregate.StageAlpha,
21+
featuregate.StageBeta,
2222
featuregate.WithRegisterDescription("When enabled, characters that are not safe in file paths are replaced in component name using the extension. For example, the data for component `filelog/logs/json` will be stored in file `receiver_filelog_logs~007Ejson` and not in `receiver_filelog_logs/json`."),
2323
featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/3148"),
2424
featuregate.WithRegisterFromVersion("v0.87.0"),

extension/storage/filestorage/extension_test.go

-4
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"go.opentelemetry.io/collector/component"
1717
"go.opentelemetry.io/collector/extension/experimental/storage"
1818
"go.opentelemetry.io/collector/extension/extensiontest"
19-
"go.opentelemetry.io/collector/featuregate"
2019
)
2120

2221
func TestExtensionIntegrity(t *testing.T) {
@@ -223,9 +222,6 @@ func TestSanitize(t *testing.T) {
223222
}
224223

225224
func TestComponentNameWithUnsafeCharacters(t *testing.T) {
226-
err := featuregate.GlobalRegistry().Set("extension.filestorage.replaceUnsafeCharacters", true)
227-
require.NoError(t, err)
228-
229225
tempDir := t.TempDir()
230226

231227
f := NewFactory()

0 commit comments

Comments
 (0)