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

Index pattern management - use new es client instead of legacy #95293

Merged

Conversation

mattkime
Copy link
Contributor

@mattkime mattkime commented Mar 24, 2021

Summary

Use new ES client instead of legacy client for index pattern management.

addresses #83910

@mattkime mattkime added v8.0.0 v7.13.0 Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages Team:AppServices chore release_note:skip Skip the PR/issue when compiling release notes labels Mar 24, 2021
@mattkime mattkime changed the title use new es client instead of legacy Index pattern management - use new es client instead of legacy Mar 24, 2021
@mattkime mattkime marked this pull request as ready for review March 24, 2021 14:19
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

Comment on lines 37 to 42
const { body } = await context.core.elasticsearch.client.asCurrentUser.transport.request({
method: 'GET',
path: `/_resolve/index/${encodeURIComponent(req.params.query)}${
queryString ? '?' + new URLSearchParams(queryString).toString() : ''
}`,
});
Copy link
Member

Choose a reason for hiding this comment

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

Does this work?

Suggested change
const { body } = await context.core.elasticsearch.client.asCurrentUser.transport.request({
method: 'GET',
path: `/_resolve/index/${encodeURIComponent(req.params.query)}${
queryString ? '?' + new URLSearchParams(queryString).toString() : ''
}`,
});
const { body } = await context.core.elasticsearch.client.asCurrentUser.resolveIndex({
expand_wildcards: req.query.expand_wildcards
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not quite, but I did figure it out, thanks

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Metrics [docs]

✅ unchanged

History

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

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

LGTM!

@mattkime mattkime merged commit 306a42c into elastic:master Mar 25, 2021
mattkime added a commit to mattkime/kibana that referenced this pull request Mar 25, 2021
…ic#95293)

* use new es client instead of legacy

* use resolve api on client
mattkime added a commit that referenced this pull request Mar 25, 2021
… (#95467)

* use new es client instead of legacy

* use resolve api on client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Kibana Management Feature label for Data Views, Advanced Setting, Saved Object management pages release_note:skip Skip the PR/issue when compiling release notes v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants