-
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
[Maps] Always check license at plugin startup #87873
[Maps] Always check license at plugin startup #87873
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
x-pack/plugins/maps/public/plugin.ts
Outdated
@@ -158,8 +158,8 @@ export class MapsPlugin | |||
}); | |||
} | |||
|
|||
public start(core: CoreStart, plugins: MapsPluginStartDependencies): MapsStartApi { | |||
setLicensingPluginStart(plugins.licensing); | |||
public async start(core: CoreStart, plugins: MapsPluginStartDependencies): Promise<MapsStartApi> { |
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 thought async was getting removed from start contract?
@joshdover can you add some context about plugin methods and async signatures?
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.
It is getting removed, probably at 8.0. Motivation is here: https://github.com/elastic/kibana/blob/master/rfcs/text/0007_lifecycle_unblocked.md
Tracking issue: #53268
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 if the start
method can truly be async.
code review and tested in firefox
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
code review
let isEnterprisePlus: boolean = false; | ||
|
||
export const getLicenseId = () => licenseId; | ||
export const getIsGoldPlus = () => isGoldPlus; | ||
|
||
let initializeLicense: (value: unknown) => void; |
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: how about moving initializeLicense, licenseInitialized, and whenLicenseInitialized next to setLicensingPluginStart so all of the logic sits in a single place in the file.
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.
changes lgtm.
tested with firefox
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
3 similar comments
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
10 similar comments
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Co-authored-by: Kibana Machine <[email protected]>
Summary
Closes #85863
Checklist
Delete any items that are not applicable to this PR.
For maintainers