-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schedule rruleset fix related #13446 #13611
Conversation
038bb73
to
8c79900
Compare
@KaraokeKev thanks for this PR, do you mind adding a couple of test cases to this file (to assert that the lookup is successful) |
duplicate PR (that aims to fix the same issue) is here #13541 We plan to merge that in, so this PR may no longer be needed. |
I would note that while #13541 does solve the base bug, it does not allow for the passing of a list or case insensitivity. |
If we could get a test case added to |
Added. |
@@ -210,10 +210,10 @@ def process_integer(self, field_name, rule, min_value, max_value, rule_number): | |||
|
|||
def process_list(self, field_name, rule, valid_list, rule_number): | |||
return_values = [] | |||
if isinstance(rule[field_name], list): | |||
if isinstance(rule[field_name], str): |
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 don't agree with this. If you look elsewhere in this file you find that this line is duplicated, and the other case has an associated comment, see #13541 (comment) for my approach to address the original intent. Best to abandon this here.
This has conflicts due to #13541, but I hope the issues are easy to follow from my review comments here. I would love to get this rebased and then merged. |
@KaraokeKev would you like to do the rebase? If not a member of our team can try to get around to this at some point in time (it will probably be merged faster if you do it though). |
Signed-off-by: Kevin Pavon <[email protected]>
Signed-off-by: Kevin Pavon <[email protected]>
Signed-off-by: Kevin Pavon <[email protected]>
1938425
to
105c5cb
Compare
Rebase completed |
Signed-off-by: Kevin Pavon <[email protected]>
716f877
to
77c00af
Compare
awx_collection/tests/integration/targets/lookup_rruleset/tasks/main.yml
Outdated
Show resolved
Hide resolved
Signed-off-by: Kevin Pavon <[email protected]> Co-authored-by: Jessica Steurer <[email protected]>
SUMMARY
Fix to process_list function. isinstance checks for list, but list is desired end state. Changed to string. Related #13446
In addition, added .lower() to value definition to allow for case-insensitivity from user input.
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION
Case 1
Prior to change:
Following change:
Case 2
Prior to change:
Following change:
Case 3
Prior to change:
Following change:
Case 4
Prior to change:
Following change: