Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Motivation and Context
We have some use cases for creating complex conditions that mimic this logic:
( foo OR bar ) AND ( baz OR qux )
( foo AND bar ) OR ( baz AND qux )
The simplest way to do this without a breaking change is to make a Condition inspector, which is a meta method similar to the ForEach inspector or the Pipeline processor. The Condition inspector is a condition (operator and inspectors) that can be referenced in other conditions to create the joined logic shown above. For example, the config below copies the value from
foo
tobar
if the logic( length(foo) > 0 AND foo starts_with "x" ) OR ( length(foo) < 4 AND foo equals "bar" )
is true:The alternative to this is a breaking change in the conditions' pkg Config struct that takes nested conditions. I'd like to avoid breaking changes till v1.0, but it might be worth considering if the config for that package should change.
How Has This Been Tested?
Added new unit tests.
Types of changes
Checklist: