-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 fix:Adds a migration for transforming TSVB vis split_filters #49000
Bug fix:Adds a migration for transforming TSVB vis split_filters #49000
Conversation
…lters from strings to query:language objects to 7.5
…he saved object's migrationVersion in failing functional test
💔 Build Failed |
💚 Build Succeeded |
Pinging @elastic/kibana-app (Team:KibanaApp) |
@timroes |
@TinaHeiligers I think I would wait with the 7.4.x labeling here until we know if there will be another version (nevertheless ideally already backport it to that branch). Given the migration version numbers: They don't really need to correlate to Kibana versions (it's nice if they do, but it's not a technical must). So since there are no other migrations in 7.5.0 for visualizations it basically doesn't matter if you use |
@elastic/kibana-qa Since that is a critical backport, could you please have a look and test this? |
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.
A couple of minor suggestions left (the only mandatory one would be the missing toHaveProperty
not being called. Otherwise looks good to me. Please wait for @elastic/kibana-qa approval before merging.
💔 Build Failed |
…split_filters_from_7_3
Backporting: there isn't a 7.4.x branch, so I'll backport to 7.4. Migration numbers, I've changed it to 7.4.2 here so that we don't end up with another migration that might need to happen before this one. |
… test expectations to more explicit ones
💔 Build Failed |
@elasticmachine merge upstream |
💚 Build Succeeded |
@bhavyarm Could you please test this PR so that I can merge it and do the backport? Steps to reproduce the missing filters situation:
With this PR, the filters will be present. To test that the fix works:
Please let me know if you have any questions. |
@TinaHeiligers we need to find a Kibana App dev to do the test you requested Bhavya to do. The test you've outlined (which is great, thanks for describing the steps so well) is going to take a fair amount of time and Bhavya and other QA are busy testing PRs that are already in 7.5.0. The QA team will still have to test it after it's merged and in the next BC. |
💚 Build Succeeded |
@timroes Should I merge? |
💚 Build Succeeded |
💚 Build Succeeded |
If possible, also backport to 7.3.x, in which case we may need to change the migration number. |
@elasticmachine merge upstream |
💚 Build Succeeded |
…stic#49000) * Bug fix:Adds a migration for transforming TSVB visualization split_filters from strings to query:language objects to 7.5 * Changes hard coded migration version to get the version number from the saved object's migrationVersion in failing functional test * Changes migration number from '7.5.0' to '7.4.2', fixes typo, changes test expectations to more explicit ones
…stic#49000) * Bug fix:Adds a migration for transforming TSVB visualization split_filters from strings to query:language objects to 7.5 * Changes hard coded migration version to get the version number from the saved object's migrationVersion in failing functional test * Changes migration number from '7.5.0' to '7.4.2', fixes typo, changes test expectations to more explicit ones
…stic#49000) * Bug fix:Adds a migration for transforming TSVB visualization split_filters from strings to query:language objects to 7.5 * Changes hard coded migration version to get the version number from the saved object's migrationVersion in failing functional test * Changes migration number from '7.5.0' to '7.4.2', fixes typo, changes test expectations to more explicit ones
) (#49496) * Bug fix:Adds a migration for transforming TSVB visualization split_filters from strings to query:language objects to 7.5 * Changes hard coded migration version to get the version number from the saved object's migrationVersion in failing functional test * Changes migration number from '7.5.0' to '7.4.2', fixes typo, changes test expectations to more explicit ones
) (#49492) * Bug fix:Adds a migration for transforming TSVB visualization split_filters from strings to query:language objects to 7.5 * Changes hard coded migration version to get the version number from the saved object's migrationVersion in failing functional test * Changes migration number from '7.5.0' to '7.4.2', fixes typo, changes test expectations to more explicit ones
) (#49493) * Bug fix:Adds a migration for transforming TSVB visualization split_filters from strings to query:language objects to 7.5 * Changes hard coded migration version to get the version number from the saved object's migrationVersion in failing functional test * Changes migration number from '7.5.0' to '7.4.2', fixes typo, changes test expectations to more explicit ones
I verified this fix on Cloud.
|
@LeeDr Thank you for following up! I'm glad it works. |
Summary
Fixes #48710
When migrating to Kibana 7.3, split_filters from the 'Group by' series option were not migrated to query:language objects. After an upgrade to 7.3, visualizations that had split_filters in previous versions don't interpret the filter as a string.
For example, if we have a TSVB visualization in Kibana 6.8 with the following configuration:
After an upgrade to 7.3, the filters appear to have been lost:
However, the filter strings haven't been deleted, they are not interpretable by the code because they are not query:language objects.
Inspecting the visState data using the utilities in the Management -> Saved Objects list, we see that the filter strings are still there:
Patches are not being backported to 7.3 anymore, so a fix to the original migration can't be applied.
A new migration has been added and runs for version 7.5. The migration transforms any remaining split_filters filters that are still strings. The migration will effectively restore the original filters if they have not been deleted.
Unfortunately, the only way to 'fix' the missing filters in a version between 7.3 and 7.5 is to manually convert the filter string to an object in the visState panel shown when inspecting the saved object as follows:
visState
split_filters
array and convert eachfilter:<string>
into an object containing the original filter string as the value for thequery
key and uselucene
as the value for thelanguage
key.You should see that the visualization's filters have been restored.
The other way to restore the filters after an upgrade to 7.3 is to inspect the saved object and manually reapply the filter as seen in the json under visState -> params -> series -> split_filters -> filter in the visualization itself.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.- [ ] This was checked for cross-browser compatibility, including a check against IE11- [ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support- [ ] Documentation was added for features that require explanation or tutorials- [ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
- [ ] This was checked for breaking API changes and was labeled appropriatelyNo breaking changes in this PR
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately