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

[Monitoring] remove imports from the legacy 'elasticsearch' package #106955

Merged

Conversation

mshustov
Copy link
Contributor

Summary

Use types and error helpers from @elatic/elasticsearch package

@mshustov mshustov added chore Team:Monitoring Stack Monitoring team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.15.0 labels Jul 28, 2021
@mshustov mshustov requested a review from a team July 28, 2021 07:12
Copy link
Contributor

@matschaffer matschaffer left a comment

Choose a reason for hiding this comment

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

LGTM overall. Curious about that ! usage though. Maybe just a learning moment for me.

@mshustov
Copy link
Contributor Author

@matschaffer _source in the response object is an optional field as the request might specify fields. Non-null assertion operator ! says: I know it presents in the response object.

Copy link
Contributor

@matschaffer matschaffer left a comment

Choose a reason for hiding this comment

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

Thanks! so sounds like you can opt to use non-null assertion when the response will definitely include a _source based on the request that it started with.

Seems like a good PR to me then. If tests agree, I'd say let's merge it.

@mshustov mshustov changed the title Monitoring remove imports of the legacy 'elasticsearch' package [Monitoring] remove imports of the legacy 'elasticsearch' package Jul 28, 2021
@mshustov mshustov changed the title [Monitoring] remove imports of the legacy 'elasticsearch' package [Monitoring] remove imports from the legacy 'elasticsearch' package Jul 28, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

@mshustov mshustov merged commit 78eb2bb into elastic:master Jul 28, 2021
@mshustov mshustov deleted the monitoring-remove-elasticsearch-imports branch July 28, 2021 19:43
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 28, 2021
…lastic#106955)

* do not import types from the legacy es package

* adjust tests
@kibanamachine
Copy link
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 Jul 28, 2021
…106955) (#107079)

* do not import types from the legacy es package

* adjust tests

Co-authored-by: Mikhail Shustov <restrry@gmail.com>
streamich pushed a commit to vadimkibana/kibana that referenced this pull request Aug 8, 2021
…lastic#106955)

* do not import types from the legacy es package

* adjust tests
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 chore release_note:skip Skip the PR/issue when compiling release notes Team:Monitoring Stack Monitoring team v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants