Fix: pass-through to runtime overrides for FilterPolicies and TargetInfoExcludedDimensions - #3012
Conversation
This is actually intentional in the API: if you set an override to So if you pass this to the API: And the configmap has: The merged result should be:
|
2902871 to
5ac3125
Compare
makes sense, I was not aware of this. looks like this is not the bug, and but is in the pass through code. updated the fix now. |
| if l != nil && l.FilterPolicies != nil { | ||
| return *l.FilterPolicies, true | ||
| } | ||
| return nil, true |
There was a problem hiding this comment.
this was the bug, it was incorrectly retuning true for FilterPolicies and TargetInfoExcludedDimensions
* Update `make docs` procedure (#3026) * Update `make docs` procedure * Trigger CI --------- Co-authored-by: grafanabot <bot@grafana.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com> * Fix: pass-through to runtime overrides for FilterPolicies and TargetInfoExcludedDimensions (#3012) * fix: handle case when userconfigurableoverrides are enabled but empty * Add CHANGELOG.md * fix panic in test * fix GetTargetInfoExcludedDimens & GetFilterPolicies * update changelog * Include distributor queue length in tempo-mixin (#2623) * Include distributor queue length in tempo-mixin * Rebuild * Compile jsonnet * Compile jsonnet * Use C jsonnet to format mixin --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: grafanabot <bot@grafana.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Suraj Nath <9503187+electron0zero@users.noreply.github.com> Co-authored-by: Zach Leslie <zach.leslie@grafana.com>
…nfoExcludedDimensions (grafana#3012) * fix: handle case when userconfigurableoverrides are enabled but empty * Add CHANGELOG.md * fix panic in test * fix GetTargetInfoExcludedDimens & GetFilterPolicies * update changelog
What this PR does:
When userconfigurableoverrides are enabled, we were returning metrics_generator
filter_policiesas empty even when it's set in per tenant runtime overrides.This is a bug, we should return per tenant runtime overides when filter_policies are not set at userconfigurableoverrides.
this PR added a len > 0 check to fix this for multiple attribuets, and adds a test for all overrides when userconfigurableoverrides is enabled.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]