You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tamaya.apache.org by "Oliver B. Fischer (JIRA)" <ji...@apache.org> on 2017/02/04 10:47:52 UTC
[jira] [Commented] (TAMAYA-236) Reconsider PropertySource ordering
and getOrdinal()
[ https://issues.apache.org/jira/browse/TAMAYA-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852741#comment-15852741 ]
Oliver B. Fischer commented on TAMAYA-236:
------------------------------------------
This problem does exist. We have at work a similar problem with Puppet and Hiera. Sometimes it is really hard to figure out where a specific values comes from.
But I don't see a good alternative to ordinals at the moment, except to hard code the lookup order. But we should have a look at other frameworks and alternatives for ordinals.
But independent from the outcome we shouldn't target this issues for 0.3. Changing this would be a major break in the functionality of Tamaya.
> Reconsider PropertySource ordering and getOrdinal()
> ---------------------------------------------------
>
> Key: TAMAYA-236
> URL: https://issues.apache.org/jira/browse/TAMAYA-236
> Project: Tamaya
> Issue Type: Improvement
> Components: API
> Affects Versions: 0.2-incubating
> Reporter: Werner Keil
> Fix For: 0.3-incubating
>
>
> As marked {{TODO rethink whole default PropertySources and ordering}} in {{PropertySource}} we should reconsider the whole {{getOrdinal()}} method.
> The Chief Architect of Lightbend, key contributor to Typesafe Config mentioned in a Microprofile discussion about ordinals, that he's
> {quote}
> unconvinced that the use of ordinals is a preferred solution for the problem at hand—it just ends up becoming magic numbers which sadly are not absolutely ordered. It is also extremely finicky since a change in an ordinal by a third party will lead to surprising effects downstream, most specifically for config value overloads.
> A deterministic, absolute, order at declaration site means that the >consumer is always in control and order cannot change due to the whims of third-party libraries.
> {quote}
> We may take a look at how e.g. Typesafe Config (and others like Apache Commons Config) handle this, but I am not aware either of them use the concept of an "ordinal" or "order" to solve this problem.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)