You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Mark Chu-Carroll <mc...@twopensource.com> on 2014/10/17 19:58:47 UTC

Review Request 26881: Improve error messages in client commands.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/
-----------------------------------------------------------

Review request for Aurora, Bill Farner and Zameer Manji.


Bugs: aurora-771
    https://issues.apache.org/jira/browse/aurora-771


Repository: aurora


Description
-------

When a client command fails due to an error in an API call,
it used to log whatever messages came back in the reply from the server,
and then generate a message saying "... see log for details".

This change improves that behavior. Now, an error message is generated
saying something like "Command failed due to error reported by server",
followed by a group of indented lines containing the messages from the
server. For example, a new error message would look like:

	Server reported error restarting job west/bozo/test/hello
	    Job 'west/bozo/test/hello' not found.


Diffs
-----

  src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
  src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
  src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
  src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
  src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
  src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
  src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
  src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
  src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 

Diff: https://reviews.apache.org/r/26881/diff/


Testing
-------


Thanks,

Mark Chu-Carroll


Re: Review Request 26881: Improve error messages in client commands.

Posted by Zameer Manji <zm...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/#review57399
-----------------------------------------------------------

Ship it!


Ship It!

- Zameer Manji


On Oct. 17, 2014, 10:58 a.m., Mark Chu-Carroll wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26881/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2014, 10:58 a.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: aurora-771
>     https://issues.apache.org/jira/browse/aurora-771
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> When a client command fails due to an error in an API call,
> it used to log whatever messages came back in the reply from the server,
> and then generate a message saying "... see log for details".
> 
> This change improves that behavior. Now, an error message is generated
> saying something like "Command failed due to error reported by server",
> followed by a group of indented lines containing the messages from the
> server. For example, a new error message would look like:
> 
> 	Server reported error restarting job west/bozo/test/hello
> 	    Job 'west/bozo/test/hello' not found.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
>   src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
>   src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
>   src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
>   src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
>   src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
>   src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
>   src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 
> 
> Diff: https://reviews.apache.org/r/26881/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mark Chu-Carroll
> 
>


Re: Review Request 26881: Improve error messages in client commands.

Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/#review57413
-----------------------------------------------------------

Ship it!


Ship It!

- Bill Farner


On Oct. 20, 2014, 7:36 p.m., Mark Chu-Carroll wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26881/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 7:36 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: aurora-771
>     https://issues.apache.org/jira/browse/aurora-771
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> When a client command fails due to an error in an API call,
> it used to log whatever messages came back in the reply from the server,
> and then generate a message saying "... see log for details".
> 
> This change improves that behavior. Now, an error message is generated
> saying something like "Command failed due to error reported by server",
> followed by a group of indented lines containing the messages from the
> server. For example, a new error message would look like:
> 
> 	Server reported error restarting job west/bozo/test/hello
> 	    Job 'west/bozo/test/hello' not found.
> 
> 
> Diffs
> -----
> 
>   examples/vagrant/aurorabuild.sh a27636655d722ca79f66b377fd847954d52e8feb 
>   src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
>   src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
>   src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
>   src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
>   src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
>   src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
>   src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
>   src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 8f4d2b01c9fa5a6ec9e8885a2d4fa0e9c3abb8a1 
> 
> Diff: https://reviews.apache.org/r/26881/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mark Chu-Carroll
> 
>


Re: Review Request 26881: Improve error messages in client commands.

Posted by Joshua Cohen <jc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/#review57416
-----------------------------------------------------------

Ship it!


Ship It!

- Joshua Cohen


On Oct. 20, 2014, 7:36 p.m., Mark Chu-Carroll wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26881/
> -----------------------------------------------------------
> 
> (Updated Oct. 20, 2014, 7:36 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: aurora-771
>     https://issues.apache.org/jira/browse/aurora-771
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> When a client command fails due to an error in an API call,
> it used to log whatever messages came back in the reply from the server,
> and then generate a message saying "... see log for details".
> 
> This change improves that behavior. Now, an error message is generated
> saying something like "Command failed due to error reported by server",
> followed by a group of indented lines containing the messages from the
> server. For example, a new error message would look like:
> 
> 	Server reported error restarting job west/bozo/test/hello
> 	    Job 'west/bozo/test/hello' not found.
> 
> 
> Diffs
> -----
> 
>   examples/vagrant/aurorabuild.sh a27636655d722ca79f66b377fd847954d52e8feb 
>   src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
>   src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
>   src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
>   src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
>   src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
>   src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
>   src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
>   src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 8f4d2b01c9fa5a6ec9e8885a2d4fa0e9c3abb8a1 
> 
> Diff: https://reviews.apache.org/r/26881/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mark Chu-Carroll
> 
>


Re: Review Request 26881: Improve error messages in client commands.

Posted by Mark Chu-Carroll <mc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/
-----------------------------------------------------------

(Updated Oct. 20, 2014, 3:36 p.m.)


Review request for Aurora, Bill Farner and Zameer Manji.


Changes
-------

Make error messages more concise.


Bugs: aurora-771
    https://issues.apache.org/jira/browse/aurora-771


Repository: aurora


Description
-------

When a client command fails due to an error in an API call,
it used to log whatever messages came back in the reply from the server,
and then generate a message saying "... see log for details".

This change improves that behavior. Now, an error message is generated
saying something like "Command failed due to error reported by server",
followed by a group of indented lines containing the messages from the
server. For example, a new error message would look like:

	Server reported error restarting job west/bozo/test/hello
	    Job 'west/bozo/test/hello' not found.


Diffs (updated)
-----

  examples/vagrant/aurorabuild.sh a27636655d722ca79f66b377fd847954d52e8feb 
  src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
  src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
  src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
  src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
  src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
  src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
  src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
  src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
  src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 
  src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 8f4d2b01c9fa5a6ec9e8885a2d4fa0e9c3abb8a1 

Diff: https://reviews.apache.org/r/26881/diff/


Testing
-------


Thanks,

Mark Chu-Carroll


Re: Review Request 26881: Improve error messages in client commands.

Posted by Joshua Cohen <jc...@twopensource.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/#review57206
-----------------------------------------------------------


Maybe this is nitpicking, but given the confusion we've already seen users having when parsing these error messages, it might be more clear that the indented lines that follow are the message from the server if the previous line ends in a colon?

Server reported error restarting job west/bozo/test/hello:
    Job 'west/bozo/test/hello' not found.

- Joshua Cohen


On Oct. 17, 2014, 5:58 p.m., Mark Chu-Carroll wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26881/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2014, 5:58 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: aurora-771
>     https://issues.apache.org/jira/browse/aurora-771
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> When a client command fails due to an error in an API call,
> it used to log whatever messages came back in the reply from the server,
> and then generate a message saying "... see log for details".
> 
> This change improves that behavior. Now, an error message is generated
> saying something like "Command failed due to error reported by server",
> followed by a group of indented lines containing the messages from the
> server. For example, a new error message would look like:
> 
> 	Server reported error restarting job west/bozo/test/hello
> 	    Job 'west/bozo/test/hello' not found.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
>   src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
>   src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
>   src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
>   src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
>   src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
>   src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
>   src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 
> 
> Diff: https://reviews.apache.org/r/26881/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mark Chu-Carroll
> 
>


Re: Review Request 26881: Improve error messages in client commands.

Posted by Mark Chu-Carroll <mc...@twopensource.com>.

> On Oct. 20, 2014, 1:17 p.m., Bill Farner wrote:
> > src/main/python/apache/aurora/client/cli/cron.py, line 48
> > <https://reviews.apache.org/r/26881/diff/1/?file=724475#file724475line48>
> >
> >     I don't think the "reported by server" part is a useful detail, consider dropping.  Ditto for alternative wordings "reported by scheduler".

I think it's worth distinguishing between a local error detected by the client, and an error detected by the scheduler. Maybe "Server error schedulering cron job", to make it more concise, but still include the information.


- Mark


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/#review57361
-----------------------------------------------------------


On Oct. 17, 2014, 1:58 p.m., Mark Chu-Carroll wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26881/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2014, 1:58 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: aurora-771
>     https://issues.apache.org/jira/browse/aurora-771
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> When a client command fails due to an error in an API call,
> it used to log whatever messages came back in the reply from the server,
> and then generate a message saying "... see log for details".
> 
> This change improves that behavior. Now, an error message is generated
> saying something like "Command failed due to error reported by server",
> followed by a group of indented lines containing the messages from the
> server. For example, a new error message would look like:
> 
> 	Server reported error restarting job west/bozo/test/hello
> 	    Job 'west/bozo/test/hello' not found.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
>   src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
>   src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
>   src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
>   src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
>   src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
>   src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
>   src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 
> 
> Diff: https://reviews.apache.org/r/26881/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mark Chu-Carroll
> 
>


Re: Review Request 26881: Improve error messages in client commands.

Posted by Bill Farner <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/26881/#review57361
-----------------------------------------------------------

Ship it!



src/main/python/apache/aurora/client/cli/cron.py
<https://reviews.apache.org/r/26881/#comment98011>

    I don't think the "reported by server" part is a useful detail, consider dropping.  Ditto for alternative wordings "reported by scheduler".



src/main/python/apache/aurora/client/cli/jobs.py
<https://reviews.apache.org/r/26881/#comment98012>

    How about a more concise `Failed to create job`.


- Bill Farner


On Oct. 17, 2014, 5:58 p.m., Mark Chu-Carroll wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/26881/
> -----------------------------------------------------------
> 
> (Updated Oct. 17, 2014, 5:58 p.m.)
> 
> 
> Review request for Aurora, Bill Farner and Zameer Manji.
> 
> 
> Bugs: aurora-771
>     https://issues.apache.org/jira/browse/aurora-771
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> When a client command fails due to an error in an API call,
> it used to log whatever messages came back in the reply from the server,
> and then generate a message saying "... see log for details".
> 
> This change improves that behavior. Now, an error message is generated
> saying something like "Command failed due to error reported by server",
> followed by a group of indented lines containing the messages from the
> server. For example, a new error message would look like:
> 
> 	Server reported error restarting job west/bozo/test/hello
> 	    Job 'west/bozo/test/hello' not found.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/cli/context.py 4e94a4e3017f3b2ace38d6d8ce68c3c778c8cd0e 
>   src/main/python/apache/aurora/client/cli/cron.py 061b1d4f768f299d6db72c66f6bb75fdb68bc0d7 
>   src/main/python/apache/aurora/client/cli/jobs.py 0277cbed4b7eb927d6e5823b4b41d90b366f81d0 
>   src/main/python/apache/aurora/client/cli/quota.py 137aab1285a9732a3b65aee65948e836df3c7cac 
>   src/main/python/apache/aurora/client/cli/update.py 8a02b8a8b0bb531248949213da97cbc1a380bf64 
>   src/test/python/apache/aurora/client/cli/test_create.py 427f7ce4476b48d407b8bd2bf2c54c52e6e63079 
>   src/test/python/apache/aurora/client/cli/test_kill.py bac4485fa105848d96e2505c4a2ea2eee45dc968 
>   src/test/python/apache/aurora/client/cli/test_restart.py a5f94484b30ecb8417116db9ce12c015957357c5 
>   src/test/python/apache/aurora/client/cli/test_supdate.py 6775c389cb1a0b80dd17fe179e8b98d4e9db0332 
> 
> Diff: https://reviews.apache.org/r/26881/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Mark Chu-Carroll
> 
>