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

Fix migration issue with old filter queries #41245

Merged
merged 4 commits into from Jul 16, 2019

Conversation

stacey-gammon
Copy link
Contributor

@stacey-gammon stacey-gammon commented Jul 16, 2019

Summary

The code assumed that having a query property and not a meta property meant it was in a specific format (had a query_string property). This is not always the case.

fixes #41240

Checklist

Use strikethroughs to 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

For maintainers

@stacey-gammon stacey-gammon added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.4.0 v7.3.1 labels Jul 16, 2019
Copy link
Contributor

@streamich streamich 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.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@stacey-gammon stacey-gammon merged commit 3771bed into elastic:master Jul 16, 2019
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Jul 16, 2019
* Fix migration issue that assumes old filter queries that don't have meta property have query string

* fix type error

* adjust snapshot so it includes the new title attribute
stacey-gammon added a commit to stacey-gammon/kibana that referenced this pull request Jul 16, 2019
* Fix migration issue that assumes old filter queries that don't have meta property have query string

* fix type error

* adjust snapshot so it includes the new title attribute
stacey-gammon added a commit that referenced this pull request Jul 16, 2019
* Fix migration issue that assumes old filter queries that don't have meta property have query string

* fix type error

* adjust snapshot so it includes the new title attribute
stacey-gammon added a commit that referenced this pull request Jul 16, 2019
* Fix migration issue that assumes old filter queries that don't have meta property have query string

* fix type error

* adjust snapshot so it includes the new title attribute
@bhavyarm
Copy link
Contributor

This is not fixed on 7.3.0 snapshot from july 23rd. I get the same error. CC @marius-dr

@stacey-gammon
Copy link
Contributor Author

Very interesting. https://github.com/elastic/kibana/pull/41269/files was merged into 7.3, and it actually changed the error message slightly...

   logger.warning(
      `Exception @ migrations730 while trying to migrate query filters!\nError:${e}\nSearchSource JSON:\n${doc.attributes.kibanaSavedObjectMeta.searchSourceJSON}`
    );

to give more information than the original error message:

 logger.warning(`Exception @ migrations730 while trying to migrate query filters! ${e}`);

I will checkout 7.3 branch and import the file to test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.3.1 v7.4.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot import saved objects from 6.8.1 to 7.3.0 if the object has filter aggregations
4 participants