correct order (discovery clean-up part-2)#1497
Merged
ryanjbaxter merged 6 commits intospring-cloud:3.0.xfrom Nov 7, 2023
wind57:align-fabric8-k8s-discovery-clients-part-1
Merged
correct order (discovery clean-up part-2)#1497ryanjbaxter merged 6 commits intospring-cloud:3.0.xfrom wind57:align-fabric8-k8s-discovery-clients-part-1
ryanjbaxter merged 6 commits intospring-cloud:3.0.xfrom
wind57:align-fabric8-k8s-discovery-clients-part-1
Conversation
wind57
commented
Nov 3, 2023
|
|
||
| @Override | ||
| public List<String> getServices() { | ||
| return adapter.apply(client).stream().map(s -> s.getMetadata().getName()).distinct().toList(); |
Contributor
Author
There was a problem hiding this comment.
the change here is to add:
LOG.debug(() -> "will return services : " + services);
because the k8s client has such a debug log, and this one does not
wind57
commented
Nov 3, 2023
| endpoints = filteredEndpoints(client.endpoints().inAnyNamespace().withNewFilter(), properties, serviceName); | ||
| } | ||
| else if (!properties.namespaces().isEmpty()) { | ||
| if (!properties.namespaces().isEmpty()) { |
Contributor
Author
There was a problem hiding this comment.
this one is a bit subtle.
So when users call DiscoveryClient::getServices, we provide a response based on this exact order:
- selective namespaces
- all namespaces
- namespace based on "namespace resolution"
depending on which property is enabled.
With that result, they will call getInstances; but this time, as seen in this code, we will not use the abive order. Instead we will use:
- all namespaces
- selective namespaces
- namespace based on "namespace" resolution
It is highly unlikely that this can cause problems, and no one reported such a problem, nevertheless, this is a bug, imo.
Contributor
Author
|
@ryanjbaxter minor bug fix. Thank you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.