* Cleanup calculation of template sls/tpl context
Fixes#56410
* fix string formatting
* Add unit test that works against old version (with bugs)
* Updated unit tests with non-buggy values and fix found bugs
* cleanup unit tests to test underlying function
* remove old unit test components no longer used
* Cleanup
* More Cleanup
* More cleanup. Add Mock to test.support.unit
* Add changelog entries
* Fix Mockery
* Import order fix
* Handle backslashes in sls names under *nix
* Cleanup
* Make sure we return a dictionary from jinja.load_map
* Fix scenario when sls is empty but present
* Touched another file - Cleanup to make pre-commit happy
* Adding variables to docs
* Fix expected tplpath value to be OS specific and note so in docs
* removing comments from imports as per pre-commit
* removing comments from imports as per pre-commit
* Put slsvars changes behind a feature flag
* Better documentation for enable_slsvars_fixes feature flag
* Fix test that should be skipped on windows
Co-authored-by: Michael "M3" Lasevich <Michael.Lasevich@bhnetwork.com>
Co-authored-by: Sage the Rage <36676171+sagetherage@users.noreply.github.com>
Co-authored-by: Daniel A. Wozniak <dwozniak@saltstack.com>
Co-authored-by: Shane Lee <slee@saltstack.com>
* Put '.zip' to suffix_order list as well as to suffix_map.
* Update test
* Added changelog.
* Handle .pyx modules as well + test
* Test fix: guard pyximport assertions
* Ran pre-commit hook
For some of the more complex salt code--or when salt functions lack
timing stats themselves--it's desirable to be able to do thus:
```sls
{%- profile as 'inner test' %}
< jinja-code >
{%- endprofile %}
```
And get a log line like thus:
```
2019-08-05 22:10:59,531 [salt.utils.jinja ][PROFILE ][26803] Time (in seconds) to render profile block 'inner test': 5.96046447754e-06
```
This commit adds a new `profile` block tag that emits these log
statements.
The same machinery used to support the `profile` block tag is also wired
into `import_*` blocks. For example:
```sls
{%- import grains.sls as 'blah' %}
```
results in the following log statement:
```
2019-08-05 22:10:59,542 [salt.utils.jinja ][PROFILE ][26803] Time (in seconds) to render import_yaml 'grains.sls': 0.0106961727142
```
* Make proxy_config read in the proxy specific configuration which is typically found in /etc/salt/proxy.d/minionid/.
* Adding changelog.
* Fixed auto py3 update hook result
* Only lay down the required config for tests using it
* Running pre-commit bits manually.
Co-authored-by: Dmitry Kuzmenko <dmitry.kuzmenko@dsr-corporation.com>
Co-authored-by: Pedro Algarvio <pedro@algarvio.me>
* Adding a check when a source is an HTTP or FTP URL to do a query to ensure the URL is valid before returning, then we know if we need to move onto to the next source in the list or not. Adding tests.
* Adding changelog.
* Removing change from another PR.
* Fixing tests to be cross platform.
* add in a ValueError catch for BigSur services, also removes py2 code
* pylint fix
* full pyupgrade
* pylint improvements
* add changelog
* remove import comments
* remove comments in test
Co-authored-by: Gareth J. Greenaway <gareth@wiked.org>
Co-authored-by: Sage the Rage <36676171+sagetherage@users.noreply.github.com>
* add in a check so if someone passes in a service name like salt-master the module converts over to the macOS naming convention of com.saltstack.salt.master
* add note to documentation
* blacken mac_service
* add changelog for fixing 57878
* remove comments in test
Co-authored-by: Gareth J. Greenaway <gareth@wiked.org>
Co-authored-by: Sage the Rage <36676171+sagetherage@users.noreply.github.com>
- The first positional parameter of get_repo was changed
from "name" to "repo".
- aptpkg, zypperpkg, opkg, already use "repo" as the first
parameter
- Fixes#57778