-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[data.search.aggs] Remove date histogram dependency on timefilter #69858
Merged
lukeelmers
merged 4 commits into
elastic:master
from
lukeelmers:fix/aggs-remove-timefilter
Jun 29, 2020
Merged
[data.search.aggs] Remove date histogram dependency on timefilter #69858
lukeelmers
merged 4 commits into
elastic:master
from
lukeelmers:fix/aggs-remove-timefilter
Jun 29, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lukeelmers
added
review
Feature:Aggregations
Aggregation infrastructure (AggConfig, esaggs, ...)
v8.0.0
release_note:skip
Skip the PR/issue when compiling release notes
v7.9.0
labels
Jun 24, 2020
7 tasks
ppisljar
approved these changes
Jun 29, 2020
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
@elasticmachine merge upstream |
lukeelmers
force-pushed
the
fix/aggs-remove-timefilter
branch
from
June 29, 2020 16:57
dfa0b82
to
858a9e2
Compare
💚 Build SucceededBuild metrics@kbn/optimizer bundle module count
History
To update your PR or re-run it, just comment with: |
lukeelmers
added a commit
that referenced
this pull request
Jun 29, 2020
Bamieh
pushed a commit
to Bamieh/kibana
that referenced
this pull request
Jul 1, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature:Aggregations
Aggregation infrastructure (AggConfig, esaggs, ...)
release_note:skip
Skip the PR/issue when compiling release notes
review
v7.9.0
v8.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #65793
Currently aggs (and therefore the search service) has a dependency on the query service which is exclusively due to
date_histogram
's usage oftimefilter.calculateBounds
.timefilter.calculateBounds
cannot be moved to the server in its current state because of its use of the optionalforceNow
parameter, which will look for aforceNow
query string parameter onwindow.location
. TheforceNow
override is used mainly in functional tests, and also a few places in reporting, so it isn't something that we can get rid of entirely without some more extensive work.In order to make aggs available on the server, we need to ensure
date_histogram
is no longer reliant on timefilter in its current state.To that end, this PR makes the following changes:
calculateBounds
andgetTime
utilities out ofpublic/query/timefilter
and intocommon/query/timefilter
timefilter.getForceNow
into a standalone util inpublic/query/timefilter/lib
query
dependency from search service & aggs, and replaces it with acalculateBounds
dependency which can be passed in to the date histogram agg typecalculateBounds
function is defined inpublic/search/search_service
, where it uses thegetForceNow
util from timefilter to parse the querystring fromwindow.location
calculateBounds
there without theforceNow
option, thus bypassing the need forwindow
Testing notes
This is a refactor and should introduce no functional changes. Areas to check for possible regressions: date histogram visualizations -- particularly ones where the
interval
is set toauto
-- and reports generated based on such visualizations.