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

[7.x Backport] Force selection of calendar or fixed intervals #41906

Merged
merged 9 commits into from
May 20, 2019

Commits on May 6, 2019

  1. Force selection of calendar or fixed intervals in date histo agg (ela…

    …stic#33727)
    
    The date_histogram accepts an interval which can be either a calendar
    interval (DST-aware, leap seconds, arbitrary length of months, etc) or
    fixed interval (strict multiples of SI units). Unfortunately this is inferred
    by first trying to parse as a calendar interval, then falling back to fixed
    if that fails.
    
    This leads to confusing arrangement where `1d` == calendar, but
    `2d` == fixed.  And if you want a day of fixed time, you have to
    specify `24h` (e.g. the next smallest unit).  This arrangement is very
    error-prone for users.
    
    This PR adds `calendar_interval` and `fixed_interval` parameters to any
    code that uses intervals (date_histogram, rollup, composite, datafeed, etc).
    Calendar only accepts calendar intervals, fixed accepts any combination of
    units (meaning `1d` can be used to specify `24h` in fixed time), and both
    are mutually exclusive.
    
    The old interval behavior is deprecated and will throw a deprecation warning.
    It is also mutually exclusive with the two new parameters. In the future the
    old dual-purpose interval will be removed.
    
    The change applies to both REST and java clients.
    polyfractal committed May 6, 2019
    Configuration menu
    Copy the full SHA
    3d86288 View commit details
    Browse the repository at this point in the history

Commits on May 7, 2019

  1. Update version skips

    polyfractal committed May 7, 2019
    Configuration menu
    Copy the full SHA
    fe5a9fb View commit details
    Browse the repository at this point in the history
  2. Update movavg doc tests

    polyfractal committed May 7, 2019
    Configuration menu
    Copy the full SHA
    2f1dc24 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2019

  1. Configuration menu
    Copy the full SHA
    0787658 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa7e1b6 View commit details
    Browse the repository at this point in the history
  3. Throw exception if legacy interval cannot be parsed

    Due to the fallthrough logic, DateIntervalWrapper assumed that an
    otherwise unparsable interval was a legacy fixed millis interval. This
    could then NPE if the interval was just illegal ("foobar").
    
    This commit correctly checks if the legacy millis parsing fails too,
    and throws an IllegalArgumentException at that point signaling the
    provided interval is bad.
    polyfractal committed May 8, 2019
    Configuration menu
    Copy the full SHA
    b8e622d View commit details
    Browse the repository at this point in the history

Commits on May 9, 2019

  1. Fix max_bucket test by disallowing partial results (elastic#41959)

    The Max Bucket test can potentially return a partial response,
    where one of the shards suceeds but another fails due to the max_bucket
    setting.  In the case of a partial failure, the status code is 200 OK
    since some results were returned (with failures listed in the body).
    
    This makes the yaml test fail since it is expecting a 4xx/5xx failure
    when catching exception messages.
    
    We need to disallow partial results so that the entire query fails
    and we can check for the max_bucket failure.
    polyfractal committed May 9, 2019
    Configuration menu
    Copy the full SHA
    7049882 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2019

  1. Add documentation for calendar/fixed intervals (elastic#41919)

    Original PR missed documentation for the new calendar/fixed
    intervals.  This adds the missing documentation
    polyfractal committed May 10, 2019
    Configuration menu
    Copy the full SHA
    9e56889 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2019

  1. Configuration menu
    Copy the full SHA
    b60737a View commit details
    Browse the repository at this point in the history