Repository navigation
Top file enhancements - #24878
Top file enhancements#24878
Conversation
There was a problem hiding this comment.
We should put a check here to not include envs that do not exist in the return from the self.client.envs() call
|
Note: Add |
|
Hey, I just tried out the My topfiles look like: |
|
Thanks for this implementation, we bumped into #12483 and from our point of view the Reading some comments on #12483 this fix seems important. |
|
Go Go Jenkins! |
|
@mathom Sorry for the big delay in responding! That config value was actually incorrect and based on a previous approach I had, which I forgot to remove. I've updated the default config with the proper value. |
Add new option for top_file_merging_strategy to config Add master config file option Adding additional tests Lexicographical test works Make default strategy Simplify to just an option about whether or not to merge Changes Implement ordered top files Implement merge strategies and default top files Lint Doc rewrite and start on ordering Remove debugging Moving to env_order Adding env_order Still writing tests More tests and docs
There was a problem hiding this comment.
These hostnames with the env contained within the ID were probably intentional. If you don't pin a minion to an env with the methods you mention below in "Choosing an Environment" then the environment is chosen from the top file. The result of this change means the webserver* minions are now in all the dev, qa, and prod environments!
There was a problem hiding this comment.
Good point. I ended up removing these because I felt like they were making the documentation too difficult to understand.
|
Wrapping one's head around top file compilation is headache-inducing; it's very possible I'm doing something wrong. Question about environment: staging
env_order:
- staging
- baseShouldn't the top and bottom results be identical? % salt 'kevin' state.show_top saltenv=base
kevin:
----------
base:
- wait
% salt 'kevin' state.show_top saltenv=staging
kevin:
----------
staging:
- foo
% salt 'kevin' state.show_top
kevin:
----------
staging:
- foo |
|
@whiteinge First match wins, not the last match. Should it be the other way around? First match made sense to me, but maybe I'm being silly. :-/ |
|
I tried both orders and got the same result both ways.
|
|
@whiteinge Ah, K. Thanks. Investigating. |
Spelling and top-file-only aditions
|
Note to self: Should go back to 2015.8. |
Refs #12483
This is designed to make it easier to manage the currently undefined and effectively broken handling of multiple top files across mutiple environments.
This PR introduces some new configuration options:
top_file_merging_strategyandenv_order. They are both documented in the updated reference page.This is currently a work-in-progress and will sit in the PR queue for a while so that people can provide feedback before we get it merged.