-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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.5] [Discover] fix histogram min interval #52758
[7.5] [Discover] fix histogram min interval #52758
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit fix the missing bars on the histogram of Discover. Discover is passing a minInterval parameter in milliseconds that is not the the minimum interval in milliseconds between the buckets. Calendar intervals are not fixed and this value change depending on time range and the time zone. To avoid patching the elastic-chart and upgrading the dependency we applied a temporary patch to the histogram code. For the feature version this patch will be removed and a correct minInterval computation will be done directly in elastic-charts. fix elastic#52152
d473816
to
e614953
Compare
src/legacy/core_plugins/kibana/public/discover/directives/histogram.test.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kertal thanks for the check let me see if this is related to this other ES bug just discovered: elastic/elasticsearch#50139 |
I can confirm that I can reproduce the @kertal reported error. It's related to the discovered bug elastic/elasticsearch#50139: when using |
Issue I've reported was saved 👍 this is the request sent to ES:
|
@kertal that seems to an ES issue with some time_zones.
you will get the same error. With other timezones it doesn't happen |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, Issue is now solve. The latest error I've found is unrelated to this issue, but a separate issue should be opened. appreciate if someone takes care of this, since I'm OOO, but else I can do this tomorrow
Pinging @elastic/kibana-app (Team:KibanaApp) |
* [DOCS} 7.5.1 Release Nottes * Changed Visualizations heading and added #52758
thx I've opened the following issue : elastic/elasticsearch#50265 |
Summary
This commit fix the missing bars on the histogram of Discover.
Discover is passing a minInterval parameter in milliseconds that is not
the the minimum interval in milliseconds between the buckets. Calendar intervals
are not fixed and this value change depending on time range and the time zone.
To avoid patching the elastic-chart and upgrading the dependency we applied a temporary patch
to the histogram code. For the feature version this patch will be removed
and a correct minInterval computation will be done directly in elastic-charts.
fix #52152
to test:
add some data that spans multiple years (possibly leap years, last one was 2016)
create the index pattern for that index:
logstash-*
orlong_window_logstash*
check the behaviour on histogram when the timerange spans several years (including leap years) with different interval configuration. The issue is visible when:
visualizing a timerange with monthly intervals that contains data in the February bucket
timezone:
all
time range:
Nov 1, 2017 @ 01:00:00.000 - Mar 21, 2018 @ 02:00:00.000
intervals:
Monthly
visualizing a timerange with a DST time change within the range. The DST change needs to be a positive change like when the time is moved forward (= that day last less than 24 hours) like in the following situation:
timezone:
Europe/Berlin
(doesn't happen with UTC timezone)time range:
Mar 1, 2018 @ 00:00:00.000 - May 1, 2018 @ 00:00:00.000
intervals:
all except Monthly and Yearly
visualizing a timerange with a DST time change with
auto
interval on a fixed/multi days interval:timezone:
Europe/Berlin
time range:
Last 15 years - now
intervals: every interval smaller than month (be sure that the scaled interval is scaled to 30days)
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
[ ] This was checked for breaking API changes and was labeled appropriately[ ] This includes a feature addition or change that requires a release note and was labeled appropriately