fix: resolve exception when action ID is passed to printer formatter#61
fix: resolve exception when action ID is passed to printer formatter#61nats merged 2 commits intobinarylane:mainfrom
Conversation
|
@david-pershouse when --async is not used with ActionLinkRunner, the progress of the action is shown on stderr. On completion the initial data included with the ActionLink response (e.g. a "server" object when creating a server) is passed to the printer. When --async is used with ActionLinkRunner, the action ID is passed to printer; and then the data included with the ActionLink response is also passed to the printer. This results in two printouts; which looks kinda weird - especially so when --output json. Maybe we should not output the data included with ActionLink response when --async is used? If we made that change in this PR it would not be a beaking change, since currently the exception raised on printing the action ID prevents the second printout from occurring. |
this makes sense to me, if the user wants to track the action themselves etc, a single output of just the action is probably most useful and less confusing |
06a2969 to
856ea6f
Compare
When
--asyncis used in combination with ActionLinkRunner, theresponsepassed to printer is the action ID as a bareint. This PR updatesformatter.format_response()to correctly handle this case.JsonPrinter had a similar issue which I have also resolved.