-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[cloud plugin] Add serverless projectId to configuration and contract #161728
[cloud plugin] Add serverless projectId to configuration and contract #161728
Conversation
Pinging @elastic/kibana-core (Team:Core) |
Pinging @elastic/fleet (Team:Fleet) |
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.
LGTM!
@@ -219,6 +219,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { | |||
'xpack.cloud.organization_url (string)', | |||
'xpack.cloud.billing_url (string)', | |||
'xpack.cloud.profile_url (string)', | |||
'xpack.cloud.serverless.project_id (string)', |
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.
optional nit: it'd be great to leave a comment saying that it doesn't include anything sensitive, just in case we have to conduct an audit of this file at some point.
* The serverless projectId. | ||
* Will always be present if `isServerlessEnabled` is `true` | ||
*/ | ||
projectId?: string; |
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.
NIT I wonder if it should be the whole 'serverless'
section that is optional instead.
Does it make sense to have a serverless: {}
empty section?
Could the fact that the "serverless" property is defined be enough to determine that "serverless is enabled"? This way we would get rid of the isServerlessEnabled
flag.
Serverless does not sound like something you can enable / disable, either you are or not on serverless, WDYT?
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.
For now it would make more sense. The thing is, we will likely add more serverless attributes to this section, and given their presence may be optional, it could complicate the thing (the same reason why the props are each individually nullable for ESS-related props)
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.
LGTM!
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Page load bundle
Unknown metric groupsAPI count
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
Fix #161652
Add the
serverless.projectId
config setting to thecloud
plugin, and expose theisCloudServerless
andserverless.projectId
info from the cloud plugin's API.