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

[Bug] missing timepicker:quickRanges migration #93409

Merged
merged 3 commits into from
Mar 4, 2021

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Mar 3, 2021

Summary

Resolves #92267

While the format of timepicker:quickRanges changed in 6.x, upgrades continued working as the format was backwards compatible.
But since 7.9 added uiSettings validation, old formats would cause errors if trying to edit them:

{"type":"log","@timestamp":"2021-02-22T12:17:17-05:00","tags":["warning","ui-settings-service"],"pid":73756,"message":"Ignore invalid UiSettings value. Error: [validation [timepicker:quickRanges].0.section]: definition for this key is missing."}
{"type":"log","@timestamp":"2021-02-22T12:17:27-05:00","tags":["warning","ui-settings-service"],"pid":73756,"message":"Ignore invalid UiSettings value. Error: [validation [timepicker:quickRanges].0.section]: definition for this key is missing."}
{"type":"log","@timestamp":"2021-02-22T12:17:37-05:00","tags":["warning","ui-settings-service"],"pid":73756,"message":"Ignore invalid UiSettings value. Error: [validation [timepicker:quickRanges].0.section]: definition for this key is missing."}

This PR adds a migration removing the section parameter from timepicker:quickRanges, when upgrading beyond 7.12.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lizozom lizozom added bug Fixes for quality problems that affect the customer experience v8.0.0 Team:AppServices release_note:skip Skip the PR/issue when compiling release notes v7.12.0 SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week labels Mar 3, 2021
@lizozom lizozom requested a review from a team as a code owner March 3, 2021 12:35
@lizozom lizozom self-assigned this Mar 3, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@lizozom lizozom requested a review from afharo March 3, 2021 14:51
@joshdover
Copy link
Contributor

Should we also add a new migration for 7.12 that does this change too? That way if someone already upgraded to 7.9-7.11, they'll also get the fix.

@rudolf
Copy link
Contributor

rudolf commented Mar 3, 2021

yeah for the reason Josh mentioned we should rather release this as a 7.12 migration since we can't backport the migration itself to 7.9.

From
https://www.elastic.co/guide/en/kibana/7.12/kibana-platform-api.html#_writing_migrations

The version number of a migration must always be the earliest Kibana version in which this migration was released. So if you are creating a migration which will be part of the v7.10.0 release, but will also be backported and released as v7.9.3, the migration version should be: 7.9.3.

@lizozom
Copy link
Contributor Author

lizozom commented Mar 4, 2021

@rudolf @joshdover I've turned this into a 7.12 migration

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @lizozom

@lizozom lizozom merged commit f5351e6 into elastic:master Mar 4, 2021
@lukeelmers
Copy link
Member

@lizozom Would you be willing to add a unit test for this in a follow-up PR? New migrations always make me a bit nervous 🙂

lizozom added a commit to lizozom/kibana that referenced this pull request Mar 4, 2021
* timepicker:quickRanges

* code review

* Change into a 7.12 migration
lizozom added a commit that referenced this pull request Mar 4, 2021
* timepicker:quickRanges

* code review

* Change into a 7.12 migration
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 4, 2021
* master: (107 commits)
  [Logs UI] Fix log stream data fetching (elastic#93201)
  [App Search] Added relevance tuning search preview (elastic#93054)
  [Canvas] Fix reports embeddables (elastic#93482)
  [ILM] Added new functional test in ILM for creating a new policy (elastic#92936)
  Remove direct dependency on statehood package (elastic#93592)
  [Maps] Track tile loading status (elastic#91585)
  [Discover][Doc] Improve main documentation (elastic#91854)
  [Upgrade Assistant] Disable UA and add prompt (elastic#92834)
  [Snapshot Restore] Remove cloud validation for slm policy (elastic#93609)
  [Maps] Support GeometryCollections in GeoJson upload (elastic#93507)
  [XY Charts] fix partial histogram endzones annotations (elastic#93091)
  [Core] Simplify context typings (elastic#93579)
  [Alerting] Improving health status check (elastic#93282)
  [Discover] Restore context documentation (elastic#90784)
  [core-docs] Edits core-intro section for the new docs system (elastic#93540)
  add missed codeowners (elastic#89714)
  fetch node labels via script execution (elastic#93225)
  [Security Solution] Adds getMockTheme function (elastic#92840)
  Sort dependencies in package.json correctly (elastic#93590)
  [Bug] missing timepicker:quickRanges migration (elastic#93409)
  ...
lizozom added a commit to lizozom/kibana that referenced this pull request Mar 11, 2021
* timepicker:quickRanges

* code review

* Change into a 7.12 migration
# Conflicts:
#	src/core/server/ui_settings/saved_objects/migrations.ts
@lizozom lizozom mentioned this pull request Mar 11, 2021
9 tasks
lizozom added a commit that referenced this pull request Mar 17, 2021
* [Bug] missing timepicker:quickRanges migration (#93409)

* timepicker:quickRanges

* code review

* Change into a 7.12 migration
# Conflicts:
#	src/core/server/ui_settings/saved_objects/migrations.ts

* Delete migration

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes SharedUX/fix-it-week Bugs that have been groomed and queued up for the team's next fix it week v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User quick range settings disappear after upgrade from 6.8.x ->7.12
7 participants