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

Add migration logging for gauges #38764

Merged
merged 3 commits into from
Jun 14, 2019
Merged

Conversation

kertal
Copy link
Member

@kertal kertal commented Jun 12, 2019

Summary

In #34982 the migrations logger was added to the migration's transform function.
Motivation: There are several try {} catches {} in the code, to prevent the whole migration from failing. But there is lack of information, why the execution failed. Lost info for debugging in development and of course in production.

Old:

catch (e) {
   // ⛄ Let it go, the data is invalid and we'll leave it as is
}

New:

catch (e) {
   logger.warning(`Exception @ migrateGaugeVerticalSplitToAlignment! ${e}`);
   logger.warning(`Exception @ migrateGaugeVerticalSplitToAlignment! Payload: ${visStateJSON}`);
}

This PR implements this pattern in a migration introduced in #34845, since there are several old patters, it could be applied to other migration, or of course future migration code

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

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal kertal requested review from spalger and timroes June 12, 2019 10:13
@kertal kertal added release_note:skip Skip the PR/issue when compiling release notes v8.0.0 v7.3.0 labels Jun 12, 2019
Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM, but there are sooooo many unrelated changes, and I just want to say that I noticed :))

@kertal
Copy link
Member Author

kertal commented Jun 14, 2019

LGTM, but there are sooooo many unrelated changes, and I just want to say that I noticed :))

thx @spalger, yes better do unrelated formatting changes in different PRs .. in this case I'm still researching which of my fingers triggered the unintended auto formatting ... so far, my left thumb denies that he was involved :)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@kertal kertal merged commit d08f325 into elastic:master Jun 14, 2019
kertal added a commit to kertal/kibana that referenced this pull request Jun 14, 2019
* Add migration logging for gauges

* Undo use  invalid JSON function for testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported release_note:skip Skip the PR/issue when compiling release notes v7.3.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants