Skip to content

Conversation

@wind57
Copy link
Contributor

@wind57 wind57 commented Mar 28, 2025

No description provided.

wind57 added 10 commits March 20, 2025 14:51
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
Signed-off-by: wind57 <[email protected]>
protected void putPathConfig(CompositePropertySource composite) {

if (!properties.paths().isEmpty()) {
Set<String> uniquePaths = new LinkedHashSet<>(properties.paths());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we do this for configmaps, but not for secrets, so I decided to add it here

// we know that the type is correct here
managedSources.add((S) mountConfigMapPropertySource);
}
else if (propertySource instanceof SecretsPropertySource secretsPropertySource) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am fixing a bug here with this one.

In case of configmaps, when we create a property source from paths, we create an instance of MountConfigMapPropertySource. Then, in ConfigReloadUtil, there is such a check:

if (source instanceof MountConfigMapPropertySource mountConfigMapPropertySource) { ... }

which means that reloads will take it into consideration.


While refactoring one integration test, I saw that it is failing, and after some debugging, realized that we have no code like the above for secrets. As such, I added that simple condition, because when we create a property source from paths in case of secrets, we create an instance of SecretsPropertySource


// sometimes we get errors like :

// "message": "Discovery failed for some groups,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we have already this logic in fabric8 client, so I added it in here too

Signed-off-by: wind57 <[email protected]>
@wind57 wind57 marked this pull request as ready for review March 28, 2025 12:42
@wind57
Copy link
Contributor Author

wind57 commented Mar 28, 2025

@ryanjbaxter this was supposed to be just one more IT refactor, but it turned out a bit more complicated. I added comments to the relevant parts that I need your eyes on, the rest is refactoring on an existing integration test. thank you

@ryanjbaxter
Copy link
Contributor

Can we separate the bug fix out into its own PR?

@wind57
Copy link
Contributor Author

wind57 commented Mar 28, 2025

I thought about it too, but it gets kind of ugly. If you say its a must do, I will, of course.

@ryanjbaxter
Copy link
Contributor

Why is it ugly? Would it help to merge the fix before the refactor (or the other way around)?

@wind57
Copy link
Contributor Author

wind57 commented Mar 28, 2025

hmm, you're probably right. Let me try that

@wind57 wind57 closed this Mar 28, 2025
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