-
Notifications
You must be signed in to change notification settings - Fork 151
Improve error handling for users using the schema command #750
Conversation
d1bed19
to
fb1772b
Compare
ujt_ambiguity_msg = ( | ||
'You should provide exactly one of the attributes' | ||
' job_template, project, workflow, inventory_source, or unified_job_template.' | ||
) |
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.
This is way better wording!
@@ -45,16 +45,19 @@ def __init__(self, data, wfjt, include_id=False): | |||
else: | |||
node_attrs[fd] = data[fd] | |||
node_attrs['workflow_job_template'] = wfjt | |||
ujt_ambiguity_msg = ( | |||
'You should provide exactly one of the attributes' | |||
' job_template, project, workflow, inventory_source, or unified_job_template.' |
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.
👍 for this clear message. Although I am not familiar with unified_job_template
@@ -127,6 +127,16 @@ network with a tower-cli command after the constituent resources like | |||
the job templates and projects were created by preceding tower-cli | |||
commands. | |||
|
|||
Workflows Inside Workflows |
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.
This is good. How about adding workflow
above as well in the example https://github.com/ansible/tower-cli/pull/750/files#diff-e888d13496218a3618bbee8be0d2a7d1R114-R124 ? I see example already shows jt, project, inv_source, so we can add workflow
there and make it a complete example. Just a suggestion.
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 hope you don't mind that I don't do that out of sheer laziness. I know that I've tested the content here is functional. The implication is that you can combine them all together, but we just don't want poke this library any more than we have to.
It looks like the server stopped verifying that
unified_job_template
has a non-null value because of the additional of approval nodes.This has a consequence for function of the schema command, since it was never documented how to use workflows-in-workflows. It would silently finish with null nodes, which is a sideways state.