You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2017/05/15 09:42:20 UTC

[GitHub] brooklyn-docs issue #182: Enforce the use of `brooklyn.config` in yaml examp...

Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-docs/pull/182
  
    @tbouron I agree in principle with this change, however I have a big reservation about doing this now.
    
    First, my agreements:
    * We should be consistent in our examples and in what we support. We should always use `brooklyn.config` (or if not, then we should have a separate proposal to never use it).
    * We should have one authoritative name for the each config key, and always use that in our examples. We should deprecate the other aliases.
    
    Now for my disagreement... Once we have support for deprecating config key names, we should carefully decide which name we want to be the authoritative name (is the the current "real" name, or is the alias actually a better name; or is there a new name we should change it to that is more consistent with the rest of Brooklyn!)
    
    Therefore I worry that this PR will change our examples, and then we'll change some of those back again when we figure out what the best names are. As an example, the `AutoScalerPolicy`'s config key should be `metric` rather than `autoscaler.metric` - i.e. the name used in the alias should be switched to be the authoritative name. Having the prefix "autoscaler" is just needless repetition.
    
    What makes the long-term choice of naming a bit tricky is our support for runtime-management config inheritance, i.e. inheriting config keys from a parent entity (*). Where a user does that, we want to reduce the risk of name collisions. But frankly I think we want to discourage it!
    
    (*) Our current behaviour is horrible - a config value that uses the alias is not picked up the child entities, but a config key that uses the "real name" is picked up. However, users find it extremely hard to tell the difference between "real name" and "alias" when they're looking at examples, so invariably find this behaviour baffling.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---