-
-
Notifications
You must be signed in to change notification settings - Fork 739
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
bug fix for output_value[output_key]
is not iterable
#5309
Conversation
if output_value[output_key] is not iterable and instead a boolean I receive the following error code from the st2api. IE: ``` output_value: {'stdout': '', 'stderr': '', 'exit_code': 0, 'result': True} spec: {'status': 'bool'} key: output output_key: result ``` ERROR: ``` ERROR: 500 Server Error: Internal Server Error MESSAGE: Internal Server Error for url: https://stackstorm-vf.ifp.lmco.com/api/executions/60f94708c3a6d1a338dc0ad7/children/?depth=-1 ```
This would probably also apply to int, float, and other types that are not |
Works for me.
…On Thu, Jul 22, 2021, 11:28 AM Jacob Floyd ***@***.***> wrote:
This would probably also apply to int, float, and other types that are not
Collections.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5309 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZ5TIL6BJQOVDERVX6Y6W3TZA2KJANCNFSM5AZ62MYA>
.
|
switch to using Collection instead of bool check Co-authored-by: Jacob Floyd <cognifloyd@gmail.com>
add import collections
whitespace fix
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.
Can you add a unit test that reproduce this issue so we know this patch is going to fix?
Hmm. So there were two issues: 1) the bug you found. 2) your spec is not well formed. Instead of this spec:
You need this jsonschema spec:
I'm looking at how to adjust the tests now. |
K. I added #5319 based on this. |
Where did we leave this? |
I have too many irons in the fire. I can't work on this for now. I'll come back to it when I can shift focus. |
@guzzijones add changelog entry. |
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.
OK. I added a changelog entry that mentions that output_schema
handling will change in a future release.
I also adjusted bailing out early if the output value is not an object or if a spec in output_schema is mal-formed.
I think this is ready to merge.
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.
Conditional approve. The proper fix will be followed up in v3.7.
Yes. I will rework/expand #5319 before 3.7.0. |
if output_value[output_key] is not iterable and instead a boolean I receive the following error code from the st2api.
IE:
ERROR: