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

[Search] refactor: unify license check utils #197675

Merged

Conversation

TattdCodeMonkey
Copy link
Contributor

@TattdCodeMonkey TattdCodeMonkey commented Oct 24, 2024

Summary

Introduced helpers for all the license checks and moved them to common utils so that they can be used outside of the licensing logic file. (we may even want to move these to a package in the future).

Additionally I updated the logic to utilize the built-in License class utils instead of checking for specific license levels ourselves. This should improve the reliability in the case where we ever change license types etc.

Checklist

Introduced helpers for all the license checks and moved them to common
utils so that they can be used outside of the licensing logic file. (we
may even want to move these to a package in the future).

Additionally I updated the logic to utilize the built-in License class
utils instead of checking for specific license levels ourselves. This
should improve the reliability in the case where we ever change license
types etc.
@TattdCodeMonkey TattdCodeMonkey added release_note:skip Skip the PR/issue when compiling release notes v9.0.0 Team:Search backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) v8.17.0 labels Oct 24, 2024
@TattdCodeMonkey TattdCodeMonkey requested a review from a team as a code owner October 24, 2024 15:22
@TattdCodeMonkey
Copy link
Contributor Author

@elasticmachine merge upstream

@TattdCodeMonkey
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 2.6MB 2.6MB -266.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
enterpriseSearch 53.3KB 53.7KB +406.0B

History

@TattdCodeMonkey
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@joemcelroy joemcelroy left a comment

Choose a reason for hiding this comment

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

code review only

@TattdCodeMonkey TattdCodeMonkey merged commit 5a138e3 into elastic:main Nov 13, 2024
23 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11817108433

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 13, 2024
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Nov 13, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[Search] refactor: unify license check utils
(#197675)](#197675)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Rodney
Norris","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-13T12:19:23Z","message":"[Search]
refactor: unify license check utils
(#197675)","sha":"5a138e392ff794561dc9a18d9a631be181543dca","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor","v8.17.0"],"title":"[Search]
refactor: unify license check
utils","number":197675,"url":"https://github.com/elastic/kibana/pull/197675","mergeCommit":{"message":"[Search]
refactor: unify license check utils
(#197675)","sha":"5a138e392ff794561dc9a18d9a631be181543dca"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197675","number":197675,"mergeCommit":{"message":"[Search]
refactor: unify license check utils
(#197675)","sha":"5a138e392ff794561dc9a18d9a631be181543dca"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Rodney Norris <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Search v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants