-
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
[uiSettings] Allow setting owners to register migrations #92765
Comments
Pinging @elastic/kibana-core (Team:Core) |
I feel that the migrations API is too complicated for this usecase. We can have the setting migrated without requiring a version or all those transformers to be written by developers. If the deprecated ui settings is being used we can automatically migrate it. Something similar to the |
Apart from renaming, some additional transformations are also required. There was a recently merged PR that required some internal parsing and transformation. |
@pgayvallet ++ to that. |
I'm not sure we have, but maybe @restrry could confirm that? |
we have an umbrella issue to collect enhancement requests for UiSettings service #48925 However, I agree deserves a dedicated issue to discuss (maybe extending the current one) considering that we will need a migration mechanism for both PUS and PUP from ProfileDataService
I'm not sure that the case with renaming justifies complexity. A key is not a public API, what is the problem to use any name for it? store.registerMigration({
// doesn't have access to the whole SO
'my_key': (value) => newValue;
}); |
Do we need it? I'm kind of fine with one-off hacks similar to what we did in #93409 until we have more demand, but if we think we need it to migrate existing settings to PUS and we expect that migration to happen slowly over time, then adding this sooner would make sense. |
We'll probably have a more definitive answer to this question once we finish the initial user data service implementation proposal @TinaHeiligers? |
We can start off with @legrego what's your gut instinct on a migration service for |
My gut instinct says that we can hold off on a migration service until we have a better understanding of what we need. |
I just worry about what would happen if for some reason there is a problem caused by migration execution order. I agree with @legrego to hold off until we have better understanding and stronger use cases. |
We currently have no way to let setting owners register migrations for their settings, forcing to implement such migrations directly into core code
kibana/src/core/server/ui_settings/saved_objects/migrations.ts
Lines 11 to 21 in 4584a8b
We should enhance the uiSettings server-side API to allow such migration without doing it directly in core.
The text was updated successfully, but these errors were encountered: