Skip to content

Add Alias fallbacks for simple & list settings#106997

Closed
mosche wants to merge 4 commits intoelastic:mainfrom
mosche:ES-7815_alias_fallback
Closed

Add Alias fallbacks for simple & list settings#106997
mosche wants to merge 4 commits intoelastic:mainfrom
mosche:ES-7815_alias_fallback

Conversation

@mosche
Copy link
Copy Markdown
Contributor

@mosche mosche commented Apr 2, 2024

This is a follow up on the previous attempt #106061 and implements alias support for simple and list settings on top of fallbacks. The alias behavior of a fallback is enabled by adding Property.Alias.

Fallback settings (as is today) are not well-suited when migrating a setting from one key to another. The problem is that update consumers are not properly triggered if both the old (fallback) and new setting are present causing changes to be silently ignored if the old version is used.

Alias fallbacks behave similar to fallbacks with some few differences:

  • updates to the alias are copied to the alias target in addition, so that update consumers are triggered properly.
  • Setting.exits doesn't consider fallbacks, but considers aliases which impacts the behavior of Setting.get using primary and secondary settings.

@mosche mosche added :Core/Infra/Settings Settings infrastructure and APIs Team:Core/Infra Meta label for core/infra team labels Apr 2, 2024
@mosche mosche requested a review from a team April 2, 2024 13:40
@mosche mosche added the >bug label Apr 2, 2024
@mosche mosche marked this pull request as ready for review April 2, 2024 13:41
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Hi @mosche, I've created a changelog YAML for you.

@mosche mosche marked this pull request as draft April 4, 2024 16:34
@mosche mosche closed this Apr 5, 2024
@mosche mosche deleted the ES-7815_alias_fallback branch April 30, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>bug :Core/Infra/Settings Settings infrastructure and APIs Team:Core/Infra Meta label for core/infra team v8.14.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants