Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

assure that consolidation.Consolidate always gets a non-None consolidator #1843

Merged
merged 4 commits into from
Jun 3, 2020

Conversation

Dieterbe
Copy link
Contributor

@Dieterbe Dieterbe commented Jun 3, 2020

fix #1814
Note that "special functions" resetting the consolidator is part of the current design, as described in
https://github.com/grafana/metrictank/blob/master/devdocs/expr.md, section about consolidateBy

  • when returning data back to the user via a json response and whatnot, we can consolidate down using the method requested by the user (or average, if not specified). Likewise here, when the setting encounters a special* function while traveling up to the root, the consolidation value is reset to the default (average)

arguably, this design needs to be revised completely as proposed in #1490, or until we do, special functions should set the consolidator to average rather than None, which would be more robust, and depending on how you interpret the spec, implement it more accurately, rather than having to add these checks after functions have run.

But for now, this does the job.

Copy link
Contributor

@fkaleo fkaleo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect

@Dieterbe Dieterbe merged commit 01fad0c into master Jun 3, 2020
@Dieterbe Dieterbe deleted the consolidator-none branch June 3, 2020 16:35
@fkaleo fkaleo mentioned this pull request Jun 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Panic when normalizing after summarizing
2 participants