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

Problem with consul when multiple properties-value-keys #170

Closed
ma9loub opened this issue Sep 19, 2023 · 3 comments · Fixed by #171
Closed

Problem with consul when multiple properties-value-keys #170

ma9loub opened this issue Sep 19, 2023 · 3 comments · Fixed by #171

Comments

@ma9loub
Copy link
Contributor

ma9loub commented Sep 19, 2023

Hi,
We have a problem with consul config with quarkus when we use multiple properties value keys to have property overriding
quarkus.consul-config.properties-value-keys: app/conf1,app/conf2,app/conf3

with this conf in consul

  • app/conf1 > app.property: value1
  • app/conf2 > app.property: value2
  • app/conf3 > app.property: value3

That's I want is conf2 override conf3 and conf1 override conf2 but the order of conf loading is not assured. So sometimes it's conf3 which is loaded or conf2 or conf1

I think it's from ConsulConfigSourceProvider#getConfigSources which use Uni.combine().all() and combine is not keeping the order of unis. Maybe the solution would be to use Uni.join().all() ?

Thanks for your reply

@radcortez
Copy link
Collaborator

Maybe.

Can you send a PR with a test case and the fix? :) Thanks!

@ma9loub
Copy link
Contributor Author

ma9loub commented Sep 20, 2023

Hi,
Thanks for your reply, Here ma PR: #171

Eventually, I used a linked map to conserve ordering of config sources

@radcortez
Copy link
Collaborator

Great. Thank you. Waiting for CI.

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 a pull request may close this issue.

2 participants