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

Adopt SmallRye Config #696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nscuro
Copy link
Collaborator

@nscuro nscuro commented Oct 19, 2024

Adopts SmallRye Config as underlying configuration provider.

A new alpine-test module is introduced to provide helpful functionality to test Alpine-based applications.

It contains an in-memory configuration source, and a JUnit 4 rule using said source to modify configuration properties within the scope of a test: https://github.com/stevespringett/Alpine/pull/696/files#diff-f48b406449780d75cfbcbe1e524bffeca96d349b4f9774e1f5ccd10fec4b09bdR27-R44

Applications do not need to modify environment variables or system properties anymore in order to test different configurations.

This change is backward-compatible.

Closes #695

@nscuro nscuro force-pushed the smallrye-config branch 4 times, most recently from a526ca0 to 2cb2585 Compare January 2, 2025 12:35
Closes stevespringett#695

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro marked this pull request as ready for review January 2, 2025 12:56
@nscuro
Copy link
Collaborator Author

nscuro commented Jan 2, 2025

@stevespringett Any thoughts on this?

One thing I'm excited about is that this allows us to know where a given property was sourced from (see https://github.com/stevespringett/Alpine/pull/696/files#diff-327b5b3f0c14fb274675b66191988c693226f3882e237da69ab5bc9c4b13aa61R180-R191).

That makes it possible to render certain properties in a UI, and treat them as read-only if they're sourced from an immutable source (i.e. env vars). A "mutable" source that uses Alpine's CONFIGPROPERTY database table is trivial to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adopt MicroProfile Config / SmallRye Config for configuration management
1 participant