Skip to content

Conversation

@wind57
Copy link
Contributor

@wind57 wind57 commented Nov 22, 2024

No description provided.

MapPropertySource propertySource = getMapPropertySource(s, env);
LOG.debug("Adding config map property source " + propertySource.getName());
composite.addFirstPropertySource(propertySource);
if ("true".equals(propertySource.getProperty(Constants.ERROR_PROPERTY))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the fix should be here and not in the reload. We should not be saving in the environment any property source that was computed on error.

Since reload code, calls this method anyway, it takes care to fix the issue.


There are two parts in the bug:

  • (a) when we try to see if we need to reload in the first place
  • (b) when we actually reload

In both cases, we call this locate and in both cases we need to skip a property source that was computed on error. Since reload code calls this one, the skipping of the source is done here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same thing is done in SecretsPropertySourceLocator, everything else is related to changing the tests and proper logging

@wind57 wind57 marked this pull request as ready for review November 23, 2024 18:26
@wind57
Copy link
Contributor Author

wind57 commented Nov 23, 2024

@ryanjbaxter this is ready to be looked at. My previous fix was incomplete and this one wraps up the fix. Thank you for looking into it

@ryanjbaxter ryanjbaxter merged commit 8eae516 into spring-cloud:3.1.x Nov 25, 2024
13 checks passed
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.

3 participants