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

4.x: MP ConfigSource.getOrdinal() always returns 100 if default ordinals are used #8737

Closed
barchetta opened this issue May 8, 2024 · 0 comments · Fixed by #8744
Closed
Assignees
Labels
4.x Version 4.x bug Something isn't working config microprofile
Projects
Milestone

Comments

@barchetta
Copy link
Member

Environment Details

  • Helidon Version: 4.0.8
  • Helidon MP

Problem Description

ConfigSource.getOrdinal() always returns 100 when default ordinals are used. The precedence of the config sources does appear to be correct (i.e. the sources are ordered correctly), but the getOrdinal() method always returns 100.

Steps to reproduce

Generate the Helidon Quickstart MP application using the CLI. Add this line to the GreetResource constructor:

            ConfigProvider.getConfig().getConfigSources().forEach(it -> System.out.println(it.getOrdinal() + ":" + it.getName()));

Run the application and hit an endpoint. You will see:

100:System Properties
100:Environment Variables
100:jar:file:/Users/jdipol/tmp/4.0.8/bug/quickstart-mp/target/quickstart-mp.jar!/META-INF/microprofile-config.properties

This is incorrect. The ordinals should be 400, 300, 100 (as defined in the spec).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working config microprofile
Projects
Backlog
  
Closed
Development

Successfully merging a pull request may close this issue.

1 participant