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

How should AutoConfigurationCustomizer work when file configuration is used #6576

Open
jack-berg opened this issue Jul 11, 2024 · 0 comments
Labels
autoconfiguration issues related to the autoconfiguration module Feature Request Suggest an idea for this project

Comments

@jack-berg
Copy link
Member

AutoConfigurationCustomizer provides a very useful escape hatch allowing extension of autoconfigure with programmatic configuration when env vars / system properties do not suffice.

#6575 adds support to customize the parsed configuration model, and this is useful, but there still might be instances where the configuration model does not fully represent the set of configuration options which are available via programmatic config.

We're likely to need a way to restore this escape hatch in file configuration.

We could support the AutoConfigurationCustomizer SPI, but there are some drawbacks:

  • AutoConfigurationCustomizer instances would be pulling double duty, working in both file configuration and non-file configuration scenarios. This may cause issues as implementations try to customize the SDK installation in ways that don't make sense with file configuration. For example, what does AutoConfigurationCustomizer#addPropertiesSupplier do in a file configuration scenario?
  • File configuration's StructuredConfigProperties property holder is different than the ConfigProperties property holder used in AutoConfigurationCustomizer, and it will be hard to resolve the differences in a way that makes sense.

We could introduce a new FileConfigurationCustomizer SPI with similar capabilities, with:

@jack-berg jack-berg added the Feature Request Suggest an idea for this project label Jul 11, 2024
@breedx-splk breedx-splk added the autoconfiguration issues related to the autoconfiguration module label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autoconfiguration issues related to the autoconfiguration module Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

2 participants