Bug #71445 mysqlfabric prints unparsable output to stdout
Submitted: 21 Jan 2014 14:26 Modified: 12 Dec 2014 22:40
Reporter: Jan Kneschke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Fabric Severity:S3 (Non-critical)
Version:1.4.1 OS:Any
Assigned to: CPU Architecture:Any

[21 Jan 2014 14:26] Jan Kneschke
Description:
mysqlfabric prints a python-like, json-like, ... output as result.

The output itself looks like it would be parsable, but it isn't.

How to repeat:
jan@jan-t420:~/.local/bin$ ./mysqlfabric group create group_id-global
Procedure :
{ uuid        = 01cbab7a-8dc8-4585-9629-fd3d15892c4f,
  finished    = True,
  success     = True,
  return      = True,
  activities  =
}

Suggested fix:
Either:

* make the output parsable: JSON, YAML, ... or
* hide the output on success and use exit-code 0 and use a human-focused error-msg in case of error to stderr using a non-zero exit-code.
[14 May 2014 13:50] Martin Arrieta
Bundle with the fix. In this case I have used json to send the string from the server to the client.

Attachment: bug-71445 (application/octet-stream, text), 6.92 KiB.

[14 May 2014 13:53] Martin Arrieta
Use the return value from the command as the exit code

Attachment: bug-71445-2 (application/octet-stream, text), 4.69 KiB.

[12 Dec 2014 22:40] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Fabric 1.6.1 release, and here's the changelog entry:

"mysqlfabric" would print a JSON-like output as a result, but this was
potentially confusing as it was not JSON. Valid JSON is now used.

Thank you for the bug report.