-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
expose es config on es setup contract #73055
expose es config on es setup contract #73055
Conversation
/** | ||
* Provide direct access to the current elasticsearch configuration. | ||
* | ||
* @deprecated this will be removed in a later version. | ||
*/ | ||
readonly config$: Observable<ElasticsearchConfig>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
I could have kept
legacy.config$
and expose it on the public contract instead, but now that this is going to be consumed by KP plugins, I thought it was better on top level. Also, that would allow to totally get rid ofesSetup.legacy
when we remove the legacy client -
flagged it as deprecated. Not sure if it's the right move.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep it under legacy
namespace to make it even more explicit that we are going to remove it. @joshdover any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecation tags are easy to miss (they're really only present in intellisense right now since we don't have any linter warnings for using deprecated APIs). Given that, I also prefer keeping it under the legacy
namespace to make it clear that this will be removed in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related, this new feature in TS v4 / VSCode will make deprecated APIs more apparent: https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-rc/#deprecated-support
Pinging @elastic/kibana-platform (Team:Platform) |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
* expose es config on es setup contract * move config$ back to legacy
Summary
Required for #68497
Expose
legacy.config$
on ES service setup contractChecklist