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

#81 Adjust load ordering of profiles #83

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

rbygrave
Copy link
Contributor

Config generally loads RESOURCE source first, and FILE source later. This allows the FILE source properties to override the RESOURCE source properties in a predictable manner.

Config generally loads RESOURCE source first, and FILE source later. This allows the FILE source properties to override the RESOURCE source properties in a predictable manner.
Copy link
Collaborator

@SentryMan SentryMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rbygrave rbygrave self-assigned this Jul 11, 2023
@rbygrave rbygrave added this to the 3.5 milestone Jul 11, 2023
@rbygrave rbygrave merged commit e058391 into master Jul 11, 2023
3 checks passed
@rbygrave rbygrave deleted the feature/81-profile-load-ordering branch July 11, 2023 00:24
@rbygrave
Copy link
Contributor Author

ok, pretty sure this isn't quite right. There are 2 cases it doesn't quite do the "right thing".

  1. FILE application.properties specifies config.profiles -> the RESOURCEs are not loaded at all
  2. FILE application.properties specifies ADDITIONAL profiles in config.profiles -> the ADDITIONAL RESOURCEs are not loaded

I think the 2 options for improving this are:
A) RESOURCE for profiles is loaded after loadMain(FILE) which is the original ordering before this PR
B) Keep track of profile RESOURCE that are loaded, after loadMain(FILE) then any profile RESOURCE not already previously loaded is loaded

Both of these options solve those 2 issues above. Hmm, pondering ... but maybe leaning towards option B.

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 this pull request may close these issues.

None yet

2 participants