Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic in instant query splitting when using unwrapped rate #6348

Merged
merged 3 commits into from
Jun 22, 2022

Commits on Jun 19, 2022

  1. Fix panic in instant query splitting when using unwrapped rate

    The range aggregation `rate()` supports both log ranges and unwrapped
    ranges, e.g.
    
    `rate({app="foo"} [$__interval])`
    and
    `rate({app="foo"} | unwrap bar [$__interval])`
    
    Since `rate()` was split into multiple `count_over_time()` over total
    duration, but `count_over_time()` does not support `unwrap`, unwrapped
    rate queries caused panics.
    
    This fix changes the splitting of `rate({app="foo"} | unwrap bar [$__interval]`
    into multiple `sum_over_time()` over total duration.
    
    Fixes #6344
    
    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    2c5931e View commit details
    Browse the repository at this point in the history
  2. Add tests

    Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
    chaudum committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    ef72a4c View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2022

  1. Integrate review feedback

    Co-authored-by: Susana Ferreira <susana.ferreira@grafana.com>
    chaudum and ssncferreira authored Jun 20, 2022
    Configuration menu
    Copy the full SHA
    ae6c44f View commit details
    Browse the repository at this point in the history