-
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] Enabling and disabling functionality based on current license in public
#55985
Comments
Pinging @elastic/kibana-platform (Team:Platform) |
Yes, plugin registration and status calculation operations should be separated.
👍 Is there an issue created ?
Agree, the licensing plugin can inject initial data to avoid flakiness and simplify the initial setup. |
+1 to this. Licensing can change at any point in time, so even having the license at setup time does not fully solve the issue. Management sections and the feature catalogue should introduce an API similar to the ApplicationService's @mattkime @flash1293 Are there open issues for adding this kind of API to these plugins? |
@joshdover I don't know about any for feature catalogue, will create one. Once we are at it, we should introduce the same for sample data adjustments, I recently had this problem with Graph sample data. |
I also agree that relying on an object mutability to enable or not an app can quickly break // Create a ref
const watcherHome = {
id: 'watcher',
showOnHomePage: true,
...
};
home.featureCatalogue.register(watcherHome); // registering that object
licensing.license$.pipe(first(), map(licenseToLicenseStatus)).subscribe(({ valid }) => {
if (valid) {
watcherESApp.enable();
watcherHome.showOnHomePage = true;
} else {
watcherESApp.disable();
watcherHome.showOnHomePage = false; // hoping that the ref is still good
}
}); |
PSA; We are currently migrating another plugin that is running into a license check issue using my sub-optimal workaround: #56781 @sebelga FWIW, that behaviour should be changed to a slightly safer version like here: https://github.com/elastic/kibana/pull/56393/files We just disable by default initially, then still hope the value is passed by ref (which is still the hack). |
The discussions are outdated, I will close this for now. Feel free to reopen with more recent requierements if this is still a problem for some use cases |
The idea
Currently setting up plugins that depend on a valid license being present (like Watcher) face some challenges on the
public
side in particular:home
.The following actions could be taken to address the above points, respectively:
2. Home plugin could be updated to allow for enabling and disabling registered apps.[UPDATE]
Created a separate issue for (2) here #57184
CC @restrry @rudolf
Additional information
Watcher setup PR: #55831
The text was updated successfully, but these errors were encountered: