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

[Lens] Drop partial buckets option #127153

Merged
merged 14 commits into from
Mar 10, 2022
Merged

[Lens] Drop partial buckets option #127153

merged 14 commits into from
Mar 10, 2022

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Mar 8, 2022

Summary

Fix #120128

This PR introduces the support of drop partial buckets in Lens.

Screenshot 2022-03-09 at 14 40 49

This is an example effect of the feature enabled:

drop_buckets

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens backport:skip This commit does not require backporting v8.2.0 labels Mar 8, 2022
@dej611 dej611 changed the title [Lens] Drop first buckets option [Lens] Drop partial buckets option Mar 8, 2022
@dej611
Copy link
Contributor Author

dej611 commented Mar 8, 2022

@elasticmachine merge upstream

@dej611 dej611 marked this pull request as ready for review March 9, 2022 09:25
@dej611 dej611 requested a review from a team as a code owner March 9, 2022 09:25
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@stratoula
Copy link
Contributor

As we are adding this functionality to Lens, we can also support the transition from TSVB to Lens with this setting.

image

@flash1293
Copy link
Contributor

flash1293 commented Mar 9, 2022

This addition detaches the "Minimum interval" picker from the "Customize time interval" switch - should we flip the order to keep them together?
Screenshot 2022-03-09 at 11 47 51

Also the switch should be disabled if "Bind to global time picker" is disabled - as there's no defined boundaries, there are no "partial buckets" anymore by definition (probably worth a tooltip explaining why that's the case)

@dej611
Copy link
Contributor Author

dej611 commented Mar 9, 2022

As we are adding this functionality to Lens, we can also support the transition from TSVB to Lens with this setting.

image

Technically the Lens feature is a bit wider than the TSVB one, allowing also to drop the first bucket where possible. It sounds reasonable to extents the feature in this case. What do you think @stratoula ?

@stratoula
Copy link
Contributor

Agreed :)

@dej611
Copy link
Contributor Author

dej611 commented Mar 9, 2022

This addition detaches the "Minimum interval" picker from the "Customize time interval" switch - should we flip the order to keep them together?

Screenshot 2022-03-09 at 14 40 49

Done.

Also the switch should be disabled if "Bind to global time picker" is disabled - as there's no defined boundaries, there are no "partial buckets" anymore by definition (probably worth a tooltip explaining why that's the case)

Screenshot 2022-03-09 at 14 40 42

Done. When disabled the following tooltip will be displayed on the input:

Drop partial buckets is disabled as these can be computed only for time field bound to global time picker in the top right.

I didn't want to go too much in depth with the technical explanation, so I thought a practical explanation would be more helpful. Any suggestion to improve is welcome.

As we are adding this functionality to Lens, we can also support the transition from TSVB to Lens with this setting.

Screenshot 2022-03-09 at 15 25 50

Done.

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

@stratoula
Copy link
Contributor

@dej611 I am so sorry that I didn't mention this into my previous comment but TSVB has the overwrite dataview functionality
image

You can have a global setting but also you can overwrite it per layer. The overwritten functionality is supported in the TSVB to Lens feature so I think we should also support the drop last bucket setting of a layer has the overwtite data view setting on.

@dej611
Copy link
Contributor Author

dej611 commented Mar 10, 2022

@elasticmachine merge upstream

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

LGTM, works as expected

'xpack.lens.indexPattern.dateHistogram.dropPartialBucketsHelp',
{
defaultMessage:
'Drop partial buckets is disabled as these can be computed only for time field bound to global time picker in the top right.',
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: ...a time field...

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

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

This works great Marco 👏 LGTM!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
visualizations 328 329 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.1MB 1.1MB +1.0KB
visTypeTimeseries 470.2KB 470.3KB +93.0B
total +1.1KB
Unknown metric groups

API count

id before after diff
visualizations 349 350 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dej611 dej611 merged commit d0b3c65 into elastic:main Mar 10, 2022
jloleysens added a commit to jloleysens/kibana that referenced this pull request Mar 10, 2022
…move-pdf-generation-to-screenshotting

* 'main' of github.com:elastic/kibana: (62 commits)
  [Lens] Drop partial buckets option (elastic#127153)
  chore(NA): remove unused translation xpack.ml.management.jobsSpacesList.objectNoun from fr-FR (elastic#127457)
  Add data to user details page (elastic#127019)
  [Fleet] Make upload and registry package info consistent (elastic#126915)
  [Reporting] Capture browser errors (elastic#127135)
  Initial readme commit with some stub articles (elastic#127420)
  skip flaky suite (elastic#121482)
  skip flaky suite (elastic#127416)
  Tests to ensure Kibana is handling multi-space import of saved objects correctly (elastic#127229)
  [Aggs] remove toAngularJson (elastic#127267)
  [i18n] Integrate 8.2.0 Translations (elastic#127309)
  [Security Solution] [Endpoint] Creates generic policy tab artifact component to be used for all of our artifacts (elastic#126685)
  [Kibana React] Fix Page Template `solutionNav` propagation (elastic#127140)
  [Cases] Export getRelatedCases API from cases client (elastic#127065)
  [Cloud Posture]add support for sorting benchmark page (elastic#126983)
  [User experience] Fix filters for the app (elastic#127295)
  [Fleet] Fix timeserie dimension mapping (elastic#127328)
  [data view mgmt] fix data view name wrap (elastic#127319)
  [kbn/optimizer] extract string diffing logic (elastic#127394)
  [ResponseOps] Add pagination and sorting to the alerts search strategy (elastic#126813)
  ...

# Conflicts:
#	x-pack/plugins/screenshotting/common/errors.ts
#	x-pack/plugins/screenshotting/common/index.ts
#	x-pack/plugins/screenshotting/server/screenshots/observable.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Drop first buckets option
6 participants