-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor(map): use config.get
instead of pillar.get
#95
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i like this, because it allows pulling from grains as well as resolves sdb:// uris, so if someone wants to store the data in sdb, they can.
For now, I don't really see the use case for In theory this has no impact because My 2 cents :) in summary: I'm not opposed to this change even if this subject is still quite obscure for me, and I think we (and users above all) miss information about to do things differently. |
The time difference is negligible, since it just does a lookup for the key in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like config.get
.
Good to know @gtmanfred |
config.get
instead of pillar.get
config.get
instead of pillar.get
Thanks everyone for your feedback. I've merged this PR. |
🎉 This PR is included in version 2.0.4 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This commit may need to be reverted. I've tried a workaround using TypeError: Cannot update using non-dict types in dictupdate.update() Anyone know of how this can be resolved? Or is the only option to return back to |
Update: I've been able to find a solution to this by building upon the
|
* Fix 5dc0b86 in saltstack-formulas#95 - No option `merge=True` for `config.get` * Use `pillar.get` for `salt-call` (for `salt-ssh`) * Use `config.get` otherwise
* Fix 5dc0b86 in saltstack-formulas#95 - No option `merge=True` for `config.get` * Use `pillar.get` for `salt-call` (i.e. `salt-ssh`) * Use `config.get` via. `defaults.merge` otherwise - Reintroduce based on 775a930 in saltstack-formulas#20
* Fix 5dc0b86 in saltstack-formulas#95 - No option `merge=True` for `config.get` * Use `pillar.get` for `salt-call` (i.e. `salt-ssh`) * Use `config.get` via. `defaults.merge` otherwise - Reintroduce based on 775a930 in saltstack-formulas#20
Co-Authored-By: Alexander Weidinger <aw@sz9i.net> * Fix 5dc0b86 in saltstack-formulas#95 - No option `merge=True` for `config.get` * Use `pillar.get` for `salt-call` (i.e. `salt-ssh`) * Use `config.get` otherwise
* Fix 5dc0b86 in saltstack-formulas#95 - No option `merge=True` for `config.get` * Use `pillar.get` for `salt-call` (i.e. `salt-ssh`) - Differentiate `salt-ssh`/`salt-call` via. `root_dir` * Use `config.get` via. `defaults.merge` otherwise - Reintroduce based on 775a930 in saltstack-formulas#20
* Fix 5dc0b86 in saltstack-formulas#95 - No option `merge=True` for `config.get` * Use `pillar.get` for `salt-call` (i.e. `salt-ssh`) - Differentiate `salt-ssh`/`salt-call` via. `root_dir` * Use `config.get` via. `defaults.merge` otherwise - Reintroduce based on 775a930 in saltstack-formulas#20
* `merge` not available via. `salt-ssh` * Additionally, fix 5dc0b86 in saltstack-formulas#95 - No option `merge=True` for `config.get`
## [2.1.4](v2.1.3...v2.1.4) (2019-05-15) ### Bug Fixes * **`map.jinja`:** remove `merge` from `config.get` (for `salt-ssh`) ([00e474c](00e474c)), closes [#95](#95)
We've had some discussions in Slack/IRC/Matrix about moving on from
pillar.get
toconfig.get
.libtofs.jinja
is already using the latter. SelectedWIP
for this PR since this is something to consider across all formulas. The intention here is to open up the discussion about going forward with this.CC: @gtmanfred.