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

Distributed Configuration for application name matching as "equals" #358

Closed
FrogDevelopper opened this issue May 9, 2022 · 3 comments · Fixed by #442
Closed

Distributed Configuration for application name matching as "equals" #358

FrogDevelopper opened this issue May 9, 2022 · 3 comments · Fixed by #442

Comments

@FrogDevelopper
Copy link
Contributor

Issue description

Hello,

I don't think it is an issue or a new feature, but here is what we have:

  • an application named hello-world
  • an other application name hello-world-wide

when starting application for hello-world, its name matchs the configurations both applications when we want to have it matching only its own application configuration

In the code ConsulConfigurationClient#L167 we can see that the test is on the path match startsWith

boolean isApplicationSpecificConfigKey = hasApplicationSpecificConfig && key.startsWith(applicationSpecificPath);

Nowhere on the documentation there is any mention about the name matching strategy, so we though it was an equals

I understand that this startWith strategy help manage the environment key (hello-world,dev or hello-world,prod for instances), but can't it be handle in a way that let the exact matching for the name ?
Like

boolean isApplicationSpecificConfigKey = hasApplicationSpecificConfig && (key.equals(applicationSpecificPath) || key.startsWith(applicationSpecificPath + ","));

Thanks for your time

@FrogDevelopper FrogDevelopper changed the title Distributed Configuration for application with their name start matching Distributed Configuration for application name matching as "equals" May 9, 2022
@FrogDevelopper
Copy link
Contributor Author

hello, nothing new on it ?

@FrogDevelopper
Copy link
Contributor Author

Hello, still nothing on it ?

@alvarosanchez
Copy link
Member

@FrogDevelopper as mentioned in #361 (comment), would you be willing to send a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants