[chore][receiver/vcenter] Migrate feature gate to mdatagen#47558
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 824d759367
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| from_version: "v0.104.0" | ||
| reference_url: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33607 |
There was a problem hiding this comment.
Preserve feature gate retirement version
The migration drops the previous WithRegisterToVersion("v0.107.0") setting for receiver.vcenter.resourcePoolMemoryUsageAttribute, so the generated gate now has no retirement target and is documented as To Version: N/A. This changes behavior from the prior registration in metrics.go and removes the intended deprecation/removal signal for this gate, which can leave a long-expired compatibility flag effectively permanent.
Useful? React with 👍 / 👎.
|
The |
There was a problem hiding this comment.
That deep-copy hunk was a leftover from an earlier branch, the same change was already merged into main via #47512. It no longer appears in this PR's diff after the rebase
824d759 to
c3511b7
Compare
There was a problem hiding this comment.
no need to have a changelog note, add [chore] to the title instead
There was a problem hiding this comment.
Done, removed the changelog entry and updated the title to [chore][receiver/vcenter]
| "receiver.vcenter.resourcePoolMemoryUsageAttribute", | ||
| featuregate.StageAlpha, | ||
| featuregate.WithRegisterDescription("Enables the memory usage type attribute for the vcenter.resource_pool.memory.usage metric"), | ||
| featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33607"), |
There was a problem hiding this comment.
I don't understand how this issue is related to this feature gate, could you point me to a comment/diff that proves the relationship?
There was a problem hiding this comment.
Understood, let's list https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33741 as the reference URL instead, even if it is not an issue I think it would be clearer
1dbc56e to
cee3c7b
Compare
a82b3a9 to
4a9d3ef
Compare
mx-psi
left a comment
There was a problem hiding this comment.
Changes LGTM, one question about the linter change
| - linters: | ||
| - forbidigo | ||
| path: receiver/vcenterreceiver/ | ||
| path: receiver/prometheusreceiver/ |
There was a problem hiding this comment.
Shouldn't this be removed instead?
|
Looks like there are some merge conflicts |
Move metricsgeneration.MatchAttributes feature gate registration from manual featuregate.GlobalRegistry().MustRegister() in processor.go to the metadata.yaml file, letting mdatagen generate the registration code. Remove the forbidigo lint exclusion for this package from .golangci.yml since it no longer uses manual feature gate registration. Fixes open-telemetry#46116
Add .chloggen entry for PR open-telemetry#47512 and fix import ordering in generated_package_test.go per make gogci.
Move receiver.vcenter.resourcePoolMemoryUsageAttribute feature gate registration from manual MustRegister call to metadata.yaml feature_gates section, allowing mdatagen to generate the gate registration code. Part of open-telemetry#46116. Assisted-by: Claude Sonnet 4.6
Reviewer requested no changelog entry for this chore-level change. Assisted-by: Claude Sonnet 4.6 Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
…-telemetry#33741 Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
…-telemetry#33741 Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
0eca254 to
c75d0d6
Compare
| - linters: | ||
| - forbidigo | ||
| path: receiver/vcenterreceiver/ | ||
| path: receiver/jaegerreceiver/ |
There was a problem hiding this comment.
Why change it instead of removing?
There was a problem hiding this comment.
Good catch, fixed. The block is now removed entirely.
The vcenterreceiver forbidigo exclusion is no longer needed after migrating feature gates to mdatagen-generated config. Remove the exclusion block entirely rather than substituting another receiver. Signed-off-by: Ogulcan Aydogan <ogulcanaydogan@hotmail.com>
|
Thank you for your contribution @ogulcanaydogan! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. If you are getting started contributing, you can also join the CNCF Slack channel #opentelemetry-new-contributors to ask for guidance and get help. |
Description
Migrates the
receiver.vcenter.resourcePoolMemoryUsageAttributefeature gate from a manualfeaturegate.GlobalRegistry().MustRegister()call inmetrics.goto thefeature_gates:section inmetadata.yaml, allowing mdatagen to generate the gate registration code automatically.This is part of the ongoing effort tracked in #46116.
Changes
feature_gates:section tometadata.yamlinternal/metadata/generated_feature_gates.goviago generateMustRegistercall inmetrics.gowith reference to generated gate variablescraper_test.goto use the generated gate variablereceiver/vcenterreceiver/from.golangci.ymlLink to tracking issue
Fixes part of #46116
Testing
go build ./...passesgo test ./...passesAssisted-by: Claude Sonnet 4.6