-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
Component(s)
cmd/mdatagen
Describe the issue you're reporting
When a resource attribute is disabled by default and has a warning if it's enabled, mdatagen assumes there will be no warning in the TestMetricsBuilder test of generated_metrics_test.go, regardless of whether the test overrides the default value.
I believe the bug is here:
| {{- if and $attr.Enabled $attr.Warnings.IfEnabled }} |
We should not be checking the default value, as that is handled by the following check:
| if tt.resAttrsSet == testDataSetDefault || tt.resAttrsSet == testDataSetAll { |
I believe this is the case because the resource attribute will be enabled whether it's the default value OR all are enabled.
For context, this was hit in open-telemetry/opentelemetry-collector-contrib#47184
Tip
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Reactions are currently unavailable