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

migrate es version check to new client #71215

Merged

Conversation

pgayvallet
Copy link
Contributor

@pgayvallet pgayvallet commented Jul 9, 2020

Summary

Part of #35508

Migrate the ES version check to use the new ES client instead of the legacy one.

Note: this is targeting 7.10 and should not be merged / backported to 7.9

Checklist

@pgayvallet pgayvallet added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Jul 9, 2020
@pgayvallet pgayvallet marked this pull request as ready for review July 9, 2020 11:46
@pgayvallet pgayvallet requested a review from a team as a code owner July 9, 2020 11:46
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

internalClient.nodes.info.mockReturnValueOnce([
{ body: createNodes('5.1.0', '5.2.0', '5.0.0') },
]);
// @ts-expect-error we need to return an incompatible type to use the testScheduler here
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this problem be solved when we switch to a client generated for Kibana?elastic/elasticsearch-js#1239

Copy link
Contributor Author

@pgayvallet pgayvallet Jul 9, 2020

Choose a reason for hiding this comment

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

Unfortunately no, this is the 'cannot use promises with marble scheduler' issue where we return an observable or a plain value instead of a promise to be used with rx.of. We just did not have the TS error with the legacy client because the mock was not correctly typed.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

miscellaneous assets size

id value diff baseline
upgradeAssistant 22.5KB +20.0B 22.5KB

History

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

@pgayvallet pgayvallet merged commit 7a325c9 into elastic:master Jul 15, 2020
pgayvallet added a commit to pgayvallet/kibana that referenced this pull request Jul 15, 2020
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 Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants