Commit Graph

98039 Commits

Author SHA1 Message Date
C. R. Oldham
72b2c21d31
Imported wrong six. 2018-09-21 16:00:18 -06:00
C. R. Oldham
05b216ac95
Try list matcher optimization again. 2018-09-21 15:44:40 -06:00
Erik Johnson
631eab325b
Also support passing address as a tuple
*Just* in case something else that invokes this starts using tuples at
some point, it'll save us a traceback.
2018-09-21 09:36:07 -06:00
Erik Johnson
4373a0b546
Optimize subdict matching
This reverses the order in which matches are attempted so that we start
with more deeply-nested matches first. The rationale for this is that it
is much more likely that when one uses `foo:bar:baz:hello:world`, they
are looking for a deeply-nested dictionary containing a key `hello`
which maps to `world`, than a key named `foo` matching the string
`bar:baz:hello:world`. The one case in which this change would be less
performant would be in the case where the value being checked is a
UNIX-style PATH (which uses colons as separators).
2018-09-21 09:36:07 -06:00
Erik Johnson
a3c5d248e4
Optimize subnet membership check
By using a generator comprehension, we avoid pre-allocating an entire
list of objects.
2018-09-21 09:36:06 -06:00
Erik Johnson
1593b58e3b
Optimize list matcher by doing string membership checks,
This is faster than splitting into a list and then iterating over it.
2018-09-21 09:36:06 -06:00
C. R. Oldham
5ca3b9c424
Pass __opts__ in modules/match.py since we no longer have self. 2018-09-21 09:36:05 -06:00
C. R. Oldham
4c1f2151ef
Backed out the change too far :-( 2018-09-21 09:36:04 -06:00
C. R. Oldham
3cd0848e9a
Back out list matcher optimization, somehow breaks nodegroup matching. 2018-09-21 09:36:04 -06:00
C. R. Oldham
8941245800
Lint 2018-09-21 09:36:03 -06:00
C. R. Oldham
efb8abe906
Lint 2018-09-21 09:36:02 -06:00
C. R. Oldham
85ac68b62c
Clarify doc 2018-09-21 09:36:02 -06:00
C. R. Oldham
bb40119bb9
Remove self
Fix vimfail in modules/match.py
2018-09-21 09:36:01 -06:00
C. R. Oldham
75749c7851
Remove self 2018-09-21 09:36:00 -06:00
C. R. Oldham
bee93a7bdc
Typo. 2018-09-21 09:36:00 -06:00
C. R. Oldham
04ff6a032c
Typo. 2018-09-21 09:35:59 -06:00
C. R. Oldham
6120ac247d
Add logging back into confirm_top.py, lint. 2018-09-21 09:35:58 -06:00
C. R. Oldham
34d3ef0900
Remove Matcher class and use the bare loader. 2018-09-21 09:35:58 -06:00
C. R. Oldham
7c1519ec3a
Lint 2018-09-21 09:35:57 -06:00
C. R. Oldham
c952368d36
Remove default.py 2018-09-21 09:35:56 -06:00
C. R. Oldham
2f3f4e94b4
lint 2018-09-21 09:35:56 -06:00
C. R. Oldham
1697a4340c
Revert "Fix test."
This reverts commit 86b5c95c6cece645e69f098d3dd88220435a569b.
2018-09-21 09:35:55 -06:00
C. R. Oldham
138e389e5b
Fix test. 2018-09-21 09:35:54 -06:00
C. R. Oldham
17ed9f4045
Add compound pillar_exact_match 2018-09-21 09:35:54 -06:00
C. R. Oldham
9577f15fd4
Add master-side cache matcher 2018-09-21 09:35:53 -06:00
C. R. Oldham
2495d48f49
Add docs for loadable matchers. 2018-09-21 09:35:52 -06:00
C. R. Oldham
3c37322e31
Add matchers directory and move default set of matchers to separate .py 2018-09-21 09:35:52 -06:00
C. R. Oldham
0891459395
Refactor matchers to all use similar function signatures. 2018-09-21 09:35:51 -06:00
C. R. Oldham
3c797303be
Split matchers out into separate .py files. Add refresh_matchers, sync_matchers. 2018-09-21 09:35:50 -06:00
C. R. Oldham
910d7f71a3
Remove unused imports 2018-09-21 09:35:50 -06:00
C. R. Oldham
312b0f2d37
Lint 2018-09-21 09:35:49 -06:00
C. R. Oldham
7a93b09668
Clarify setup 2018-09-21 09:35:49 -06:00
C. R. Oldham
140e816f7f
Typo 2018-09-21 09:35:48 -06:00
C. R. Oldham
ae913507dc
Handle this as a classmethod amd be smarter about setting it up. 2018-09-21 09:35:47 -06:00
C. R. Oldham
c73ba1426f
Add some more needed imports 2018-09-21 09:35:46 -06:00
C. R. Oldham
0ae06c079d
Add matchers directory and move default set of matchers to separate .py 2018-09-21 09:35:45 -06:00
C. R. Oldham
497327dd93
Add matchers directory and move default set of matchers to separate .py 2018-09-21 09:35:35 -06:00
Nicole Thomas
4555497583
Merge pull request #49725 from rallytime/fix-jenkins-1122
Skip test_local_pkg_install test again for RedHat distros.
2018-09-20 15:08:43 -04:00
Nicole Thomas
c1512810ee
Merge pull request #49711 from rallytime/merge-fluorine
[fluorine] Merge forward from 2018.3 to fluorine
2018-09-20 11:08:41 -04:00
rallytime
2d8015fb24
Skip test_local_pkg_install test again for RedHat distros.
There is a deep bug that I was not able to track down that is causing
a SyntaxError within the test suite.

Until we have time to dedicate more resources to tracking this down,
let's skip it again (recently re-enabled) for the RedHat family.

The test is used to catch an error where the salt-call command was running
twice, so we can rely on the other OSes that don't have this deep bug to
catch regressions.
2018-09-20 10:57:07 -04:00
rallytime
9298304ce9
Merge branch '2018.3' into 'fluorine'
No conflicts.
2018-09-19 14:07:06 -04:00
Nicole Thomas
936cae5017
Merge pull request #49710 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-09-19 14:05:49 -04:00
rallytime
d19c67f619
Merge branch '2017.7' into '2018.3'
No conflicts.
2018-09-19 09:59:32 -04:00
Nicole Thomas
b082f79fcb
Merge pull request #49708 from rallytime/bp-49555
Back-port #49555 to 2018.3
2018-09-19 09:12:11 -04:00
Nicole Thomas
0e97d9e694
Merge pull request #49707 from rallytime/bp-49702
Back-port #49702 to 2018.3
2018-09-19 09:09:09 -04:00
Gareth J. Greenaway
6bd85b5946
Merge pull request #49706 from garethgreenaway/1120_remove_mock_os_path_join
[2017.7] Removing os.path.join mocking from tests.
2018-09-18 21:09:09 -06:00
Florian Bergmann
ed25416542
Change StringIO import in python2 to import the class.
Instead of using StringIO in python3, use the correct BytesIO class instead.
2018-09-18 20:04:31 -04:00
rallytime
7ff24e5fb8
Mark orchestration test as expensive 2018-09-18 20:02:50 -04:00
Nicole Thomas
d375731fbd
Merge pull request #49694 from rallytime/merge-fluorine
[fluorine] Merge forward from 2018.3 to fluorine
2018-09-18 19:55:59 -04:00
Gareth J. Greenaway
f4ccc75587
Removing mocking of os.path.join from two tests, one of which was failing when used with coverage argument. No reason we should be mocking os.path.join. 2018-09-18 16:58:48 -06:00