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

[vega] Handle removal of deprecated date histogram interval #109090

Merged
merged 17 commits into from Sep 22, 2021

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Aug 18, 2021

Fixes: #106352 Closes: #106657

Summary

This PR is created as a sample solution for #106352. I suggest, implicitly for the user, to change the interval field to the value corresponding to the current interval. Other visualizations work the same way.

Plus, this solution is backward compatible with older vega specs. We shouldn't think about the complex solutions described in #106352 (comment)

What options are supported:

  1. { ... , fixed_interval: string }
  2. {..., calendar_interval: string }
  3. {..., interval: string}
  4. {..., interval: {%autointerval%: true }}
  5. {..., interval: {%autointerval%: number }}

The last three are automatically converted to fixed_interval / calendar_interval

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@stratoula
Copy link
Contributor

@alexwizp there are some cases that we are not bwc, for example, if I add as interval "month" or "day".

@alexwizp alexwizp marked this pull request as ready for review August 26, 2021 09:39
@alexwizp alexwizp requested a review from a team August 26, 2021 09:39
@alexwizp alexwizp requested a review from a team as a code owner August 26, 2021 09:39
@alexwizp alexwizp self-assigned this Aug 26, 2021
@alexwizp alexwizp added Feature:Vega Vega visualizations release_note:skip Skip the PR/issue when compiling release notes v7.16.0 v8.0.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Aug 26, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@alexwizp alexwizp added this to In progress in Legacy visualizations via automation Aug 26, 2021
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

app services changes LGTM

Copy link
Contributor

@VladLasitsa VladLasitsa left a comment

Choose a reason for hiding this comment

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

LGTM!

@stratoula
Copy link
Contributor

cc @ghudgins this is not so urgent as it will be merged for 8.0 but maybe you want to play with it

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

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.

It works fine and we keep this interval and auto_interval logic. By keeping this, it means that we support something that is not supported anymore by ES (the interval param). We have discussed it with the team and we prefer this solution rather than not being bwc. (maybe it makes sense a brief mention in our docs)

My only concern is the usage of auto_date_histogram in the default spec. As soon as we are keeping the interval setting, I think the default spec should stay as it is and provide an example of the auto_interval usage (explicit vega variable). Another reason to not use the auto_date_histogramin our default spec is that is doesn't support yet extended_bounds.

From the other hand, If we don't want to "advertise" the interval setting then the default spec should use the auto_date_histogram.

I don't have a strong opinion tbh. I would like your feedback on this one @flash1293 @ghudgins.

@stratoula
Copy link
Contributor

Synced offline with the team, we will proceed with the existing default spec that uses the interval and extended_bounds properties.

@stratoula
Copy link
Contributor

@alexwizp can we also unskip the vega functional tests #106657?

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.

Code LGTM, tested it locally in Chrome. I think we have done the best we could here.
The only thing remaining is to mention this in vega docs but I can do it on a separate PR

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
visTypeVega 240 242 +2

Async chunks

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

id before after diff
visTypeVega 1.9MB 1.9MB +111.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 492.3KB 492.5KB +186.0B
visTypeVega 35.8KB 37.0KB +1.2KB
total +1.3KB

History

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

cc @alexwizp

@stratoula stratoula removed the v7.16.0 label Sep 22, 2021
@stratoula
Copy link
Contributor

@alexwizp I removed the v7.16 label, this is only for 8 :D

@stratoula stratoula added backport:skip This commit does not require backporting release_note:enhancement and removed release_note:skip Skip the PR/issue when compiling release notes labels Sep 22, 2021
@alexwizp alexwizp merged commit 61410a3 into elastic:master Sep 22, 2021
Legacy visualizations automation moved this from In progress to Done Sep 22, 2021
@rashmivkulkarni rashmivkulkarni mentioned this pull request Sep 22, 2021
38 tasks
lykkin pushed a commit to lykkin/kibana that referenced this pull request Sep 28, 2021
…109090)

* [vega] Handle removal of deprecated date histogram interval

Fixes: elastic#106352

* fix CI

* add deprecation_interval_info

* add test

* Update vega_info_message.tsx

* fix types

* Update es_query_parser.ts

* apply comments

* fix error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>
alexwizp added a commit to alexwizp/kibana that referenced this pull request Jan 17, 2022
…109090)

* [vega] Handle removal of deprecated date histogram interval

Fixes: elastic#106352

* fix CI

* add deprecation_interval_info

* add test

* Update vega_info_message.tsx

* fix types

* Update es_query_parser.ts

* apply comments

* fix error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>
alexwizp added a commit that referenced this pull request Jan 17, 2022
* [vega] Handle removal of deprecated date histogram interval (#109090)

* [vega] Handle removal of deprecated date histogram interval

Fixes: #106352

* fix CI

* add deprecation_interval_info

* add test

* Update vega_info_message.tsx

* fix types

* Update es_query_parser.ts

* apply comments

* fix error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>

* Updates the VEGA docs for v8.0 (#112781)

* Update VEGA docs for v8.0

* Update docs/user/dashboard/vega-reference.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

* [Vega] Replacing the 'interval' property should only happen for the date_histogram aggregation (#115001)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
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:Vega Vega visualizations release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0
7 participants