Skip to content

Conversation

@gtully
Copy link
Contributor

@gtully gtully commented Jan 30, 2026

…dable config elements

@gtully gtully marked this pull request as draft January 30, 2026 14:50
@gtully
Copy link
Contributor Author

gtully commented Jan 30, 2026

There is a use case where a user has a coded configuration impl that they pass to the broker, if that contains re loadable config and there are the same entries in a properties file that is reloaded, then the reload will take precedence. In this case there are two sources of truth and one is re-loadable, I think this is the expected behaviour, but due to this bug, it is not currently the case.

@gemmellr
Copy link
Member

gemmellr commented Feb 2, 2026

There is a use case where a user has a coded configuration impl that they pass to the broker, if that contains re loadable config and there are the same entries in a properties file that is reloaded, then the reload will take precedence. In this case there are two sources of truth and one is re-loadable, I think this is the expected behaviour, but due to this bug, it is not currently the case.

It wont just 'take precedence', it could silently toss original configuration even where they dont overlap at all, giving potentially a completely different result than when the very same properties were applied at startup. So even touching the file could alter config vs startup, which itself seems like an issue.

FWIW, you added a startup class for use with images thats specifically using that behaviour, and added ability to change the properties path on another related embedding class that then allows it too, so youll likely need to look at updating those, and some of the tests that use it, if you want to change this.

@gtully gtully marked this pull request as ready for review February 3, 2026 13:26
@gtully
Copy link
Contributor Author

gtully commented Feb 3, 2026

configurationFileRefreshPeriod=-1 is necessary if there are multiple source of truth for config that supports reload.

@gtully
Copy link
Contributor Author

gtully commented Feb 3, 2026

@gemmellr I peeked at the image example tests, none have overlapping re-loadable config. I cannot find any broken usage in our test suite.

@gtully gtully requested review from gemmellr and tabish121 February 3, 2026 16:58
}

@Override
public Configuration setJaasConfigs(Map<String, JaasAppConfiguration> configs) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would normally expect a set method like this to clear the old values before writing the provided new set of entries, this one is just confuses me and seems to run counter to anything I'd expect a set method to do. The other set methods here just replace the old collection with the new one, why it this one different?

configuration.parseProperties(propertiesFileUrl);
config.parseProperties(propertiesFileUrl);
configuration.setStatus(config.getStatus());

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to disregard any configuration that was assigned programmatically via an initial configuration object when it sets the configuration from the reload of the possible XML file and then the properties file. It creates an empty configuration vessel which it might fill in from XML and or a properties file(s) set and then hard sets those entries into the existing configuration regardless of the differences between old and new which could lose original data. Its not clear when or why these differing configuration sets take precedence over each other.

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.

3 participants