forked from salt-formulas/reclass
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't insert previously negated items in
Applications.append_if_new()
We add logic in `Applications.append_if_new()` to only insert non-negated items if they aren't already on our internal negation list. Additionally, we drop items from the negation list, once we've applied the negation once either in `append_if_new()` or in `merge_unique()` so that patterns like adding, then removing and then adding an item again have the expected result of the item being present in the final list. This fixes the issue where it wasn't possible to preemptively remove an entry from the applications list in a multi-dimensional hierarchy, e.g. in a [Commodore] global defaults repository where we may want to exclude applications for a certain Kubernetes distribution regardless of the cloud on which a cluster with that distribution is running. [Commodore]: https://syn.tools/commodore
- Loading branch information
Showing
10 changed files
with
79 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
applications: | ||
- ~foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
applications: | ||
- foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
classes: | ||
- cls2 | ||
- cls1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
applications: | ||
- foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
classes: | ||
- cls1 | ||
- cls2 | ||
|
||
applications: | ||
- foo | ||
|
||
parameters: | ||
expected_apps: | ||
- foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
classes: | ||
- cls2 | ||
- cls1 | ||
|
||
parameters: | ||
expected_apps: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
classes: | ||
- cls2 | ||
- cls1 | ||
|
||
applications: | ||
- foo | ||
|
||
parameters: | ||
expected_apps: | ||
- foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
classes: | ||
- global | ||
- override | ||
|
||
parameters: | ||
expected_apps: | ||
- foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters