saltstack-formulas / prometheus-formula

Manage a Prometheus installation
Other
27 stars 51 forks source link

refactor(id): rename yaml dict 'component' to 'comp' #45

Closed noelmcloughlin closed 4 years ago

noelmcloughlin commented 4 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

This PR renames "component" dict to "comp" just to shorten the name. The map.jinja includes code to handle existing pillar data containing "component".

Pillar / config required to test the proposed changes

Debug log showing how the proposed changes work

Documentation checklist

Testing checklist

Additional context

javierbertoli commented 4 years ago

@noelmcloughlin , this IS a breaking change, did you just forgot to mark it as such?

n-rodriguez commented 4 years ago

@noelmcloughlin what's the point of this PR?

noelmcloughlin commented 4 years ago

this IS a breaking change, did you just forgot to mark it as such?

I had updated map.jinja to avoid breaking change:

## Legacy pillars support ('component' renamed to 'comp) ##
{%- if 'component' in prometheus.wanted and prometheus.wanted.component %}
    {%- do prometheus.wanted.update({'comp': prometheus.wanted.component }) %}
{%- endif %}
{%- if 'component' in prometheus.pkg and prometheus.pkg.component %}
    {%- do prometheus.pkg.update({'comp': prometheus.pkg.component }) %}
{%- endif %}
## Legacy (remove me after 31/4/21) ##
noelmcloughlin commented 4 years ago

what's the point of this PR?

It's opinionated but pointless otherwise. Happy to close it.