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

Profiles from ‘late sources’ are not found #1160

Closed
rodcheater opened this issue Apr 26, 2024 · 2 comments · Fixed by #1164
Closed

Profiles from ‘late sources’ are not found #1160

rodcheater opened this issue Apr 26, 2024 · 2 comments · Fixed by #1164

Comments

@rodcheater
Copy link

Consider an application with smallrye-config-source-file-system on the class path, with SMALLRYE_CONFIG_SOURCE_FILE_LOCATIONS set in the environment to a directory with a smallrye.config.profile file in that directory. The profile mentioned in that file is not added to the list of profiles.

@radcortez
Copy link
Member

This is expected.

SmallRye Config requires the profile resolution before loading any sources with SMALLRYE_CONFIG_SOURCE_FILE_LOCATIONS. Without the profile at this stage, we cannot determine which sources are primary sources or profile-aware sources from a location, so the profile has to be set from one of the primary sources (system properties, environment variables, or custom user source).

This is not clear in the documentation, so I'll update that:
https://smallrye.io/smallrye-config/3.8.1/config/profiles/

@rodcheater
Copy link
Author

Yup, updating the documentation would be great. 👍

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

Successfully merging a pull request may close this issue.

2 participants