-
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
[licensing] Remove unnecessary refresh calls #194499
[licensing] Remove unnecessary refresh calls #194499
Conversation
b61721e
to
efa4864
Compare
Pinging @elastic/kibana-core (Team:Core) |
Pinging @elastic/kibana-presentation (Team:Presentation) |
Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security) |
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.
Core changes LGTM!
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.
kibana-presentation changes LGTM
code review only
@@ -134,6 +134,7 @@ export class LicensingPlugin implements Plugin<LicensingPluginSetup, LicensingPl | |||
} | |||
return { | |||
refresh: this.refresh, | |||
getLicense: async () => await firstValueFrom(this.license$!), |
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 think it is worth updating docs in the Readme, right now docs say refresh: () => Promise<ILicense> allows a plugin to enforce license retrieval.
which reads misleading
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.
great point! I'll update the readme
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.
Adressed in dab01c7
(#194499)
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.
cloud_security_posture and cloud_defend changes lgtm, test cloud_security_posture
a bit manually.
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Async chunks
Page load bundle
Unknown metric groupsAPI count
References to deprecated APIs
Unreferenced deprecated APIs
History
To update your PR or re-run it, just comment with: cc @afharo |
Starting backport for target branches: 8.x |
(cherry picked from commit f3f53e0)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
# Backport This will backport the following commits from `main` to `8.x`: - [[licensing] Remove unnecessary refresh calls (#194499)](#194499) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-03T15:42:39Z","message":"[licensing] Remove unnecessary refresh calls (#194499)","sha":"f3f53e054237087aab8590084cb7c8c10972427c","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","Team:Presentation","release_note:skip","v9.0.0","Team:Cloud Security","backport:prev-minor"],"title":"[licensing] Remove unnecessary refresh calls","number":194499,"url":"https://github.com/elastic/kibana/pull/194499","mergeCommit":{"message":"[licensing] Remove unnecessary refresh calls (#194499)","sha":"f3f53e054237087aab8590084cb7c8c10972427c"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194499","number":194499,"mergeCommit":{"message":"[licensing] Remove unnecessary refresh calls (#194499)","sha":"f3f53e054237087aab8590084cb7c8c10972427c"}}]}] BACKPORT--> Co-authored-by: Alejandro Fernández Haro <[email protected]>
Summary
Removing the usage of
licensing.refresh()
as it forces a new retrieval of the license when we only need the current one.For maintainers