-
Notifications
You must be signed in to change notification settings - Fork 42
SEP 39: Allow use YAML dictionaries instead of arrays in Salt SLS files #62
base: master
Are you sure you want to change the base?
Conversation
Hello! Thank you for submitting a Salt Enhancement Proposal! Our process is detailed in the README.md and more about the SEP Life-cycle. An Open Core Team member will be assigned to follow up and help guide this SEP soon and you will find the this in the Community Slack channel #sep. |
I don't think so. A renderer can just parse the yaml, then convert the dicts back to lists (e.g. via The default |
@thatch45 may be able to weigh in on the historic reasons that arrays were chosen over dict. It may have had something to do with order, but I'm not sure. Honestly, I think the documentation would be the biggest hurdle here, and why if it were possible to support, I still would hesitate to accept this behavior. Even if the one style is weird, it's well-known. Unless you come to salt with YAML expertise and expect a 1:1 mapping of SLS files to Python, I don't think it's really that confusing. I do agree that it's a bit confusing coming from other tools that use YAML in a particular way, though. |
the problem with the default yaml render getting involved at all, the default yaml render is used a lot of places where that will change currently working behavior. such as pillar and default.yml. places were the returned information should be 1:1. in order to work with that the rendering would need to be context aware. which adds more processing of information into the renderer. one of the arguments was that this would improve performance but in having to make it context aware would actually decrease performance. to see an increase in performance you would have to do what i was saying and change the state behavior. however introducing a new renderer that is not contextual could be used to let users make the choice either way. default would still be the same and work in the same way. to enable the behavior described set |
(this isn't SEP 62 by the way, the SEP number is different to the PR number) |
Rendered proposal
This SEP is a continuation of tech debt issue saltstack/salt#61649