Skip to content

[Lens] Do not persist time zone#102735

Merged
flash1293 merged 4 commits intoelastic:masterfrom
flash1293:lens/time-zone-param
Jun 29, 2021
Merged

[Lens] Do not persist time zone#102735
flash1293 merged 4 commits intoelastic:masterfrom
flash1293:lens/time-zone-param

Conversation

@flash1293
Copy link
Copy Markdown
Contributor

Fixes #99894

This PR removes the time zone parameter from date histogram columns. We can fetch this information when building the expression and there is no upside to storing it because it can get out of sync with the used index pattern in multiple ways (like in the linked bug).

This also makes it unnecessary to change the column params on changing the index pattern. In fact, the transfer logic is now unused in Lens - I left it in however because we might need/want to go back to it at some point for smarter transition (e.g. use the clostest allowed interval of the new index pattern)

@flash1293 flash1293 added release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.0.0 Feature:Lens v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 21, 2021
@flash1293 flash1293 marked this pull request as ready for review June 21, 2021 14:49
@flash1293 flash1293 requested a review from a team June 21, 2021 14:49
@elasticmachine
Copy link
Copy Markdown
Contributor

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

'7.12.0': transformTableState,
'7.13.0': renameOperationsForFormula,
'7.13.1': renameOperationsForFormula, // duplicate this migration in case a broken by value panel is added to the library
'7.14.0': removeTimezoneDateHistogramParam,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@LeeDr New migration being added to 7.14 here FYI

@flash1293
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

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.5MB 1.5MB -288.0B

History

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

Copy link
Copy Markdown
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

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

Tested and LGTM. This does not fix the bug where rollup timezones cause lines to always be disconnected, but I can confirm that if I follow these steps it works as expected:

  1. Create a 2-layer chart with a rollup and the primary index
  2. Convert the rollup layer into the primary index, and the two layers merge
  3. Convert the rollup layer back and it work

@flash1293 flash1293 merged commit 4f63abc into elastic:master Jun 29, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 29, 2021
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jun 29, 2021
Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed Feature:Lens release_note:fix Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.14.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens] Time zone param in date histogram is not reset on transferring to non-restricted index pattern

4 participants