Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB7111084C for ; Thu, 8 Jan 2015 21:04:41 +0000 (UTC) Received: (qmail 72109 invoked by uid 500); 8 Jan 2015 21:04:42 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 72066 invoked by uid 500); 8 Jan 2015 21:04:42 -0000 Mailing-List: contact reviews-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.incubator.apache.org Delivered-To: mailing list reviews@aurora.incubator.apache.org Received: (qmail 72050 invoked by uid 99); 8 Jan 2015 21:04:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2015 21:04:41 +0000 X-ASF-Spam-Status: No, hits=-1997.8 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MANY_SPAN_IN_TEXT,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 08 Jan 2015 21:04:39 +0000 Received: (qmail 68516 invoked by uid 99); 8 Jan 2015 21:03:03 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2015 21:03:03 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 8A35A1D1FFF; Thu, 8 Jan 2015 21:03:01 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============2628241035500851643==" MIME-Version: 1.0 Subject: Re: Review Request 29698: Simplify client help output and solely use argparse. From: "Zameer Manji" To: "Maxim Khutornenko" , "Zameer Manji" , "Joshua Cohen" Cc: "Bill Farner" , "Aurora" Date: Thu, 08 Jan 2015 21:03:01 -0000 Message-ID: <20150108210301.26560.50223@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Zameer Manji" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/29698/ X-Sender: "Zameer Manji" References: <20150108203216.26559.81260@reviews.apache.org> In-Reply-To: <20150108203216.26559.81260@reviews.apache.org> Reply-To: "Zameer Manji" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============2628241035500851643== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29698/#review67293 ----------------------------------------------------------- Ship it! Ship It! - Zameer Manji On Jan. 8, 2015, 12:32 p.m., Bill Farner wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29698/ > ----------------------------------------------------------- > > (Updated Jan. 8, 2015, 12:32 p.m.) > > > Review request for Aurora, Joshua Cohen, Maxim Khutornenko, and Zameer Manji. > > > Bugs: AURORA-994 > https://issues.apache.org/jira/browse/AURORA-994 > > > Repository: aurora > > > Description > ------- > > The only downside with this patch is that we've technically lost test coverage of our help output. This is rather involved if we want to change it. I ventured down the path of preserving `test_help.py`, but the best i could come up with (without a larger refactor on our end) was to patch `_print_message` and `exit` functions from `argparser.ArgumentParser`. This still did not address the fact that it accesses `sys.argv[0]` directly. Again - we could restructure to work around it, but at this point i think the value is dubious. > > > Diffs > ----- > > docs/client-commands.md 75e69541fd95dfd9a7aa1e04de1a590b8fcbeacf > docs/client.md 3ec39b4f3bd6b45692aa1291e66a0a171d7dbb68 > src/main/python/apache/aurora/client/cli/__init__.py 395819fdf24b7919b32be51060fb5b581c8e1514 > src/main/python/apache/aurora/client/cli/client.py 939e32b0287a4a6e9cd66c4d6ffe05b32ed26d78 > src/main/python/apache/aurora/client/cli/options.py b7f5a031d135a33ec2d79aa521ce9c1438eb58c1 > src/main/python/apache/aurora/client/cli/task.py e084c5bef54d8a726276764ed7e5ce44cdc99ec5 > src/test/python/apache/aurora/client/cli/BUILD bbac5c8efc9892fd2a966a6ac25fe05ffd740733 > src/test/python/apache/aurora/client/cli/test_help.py 9fa05e683f01a0e51253e08aa7fba69fd49d3756 > src/test/python/apache/aurora/client/cli/test_plugins.py cf742a3feb12c6bb8fc6e80f15daaac7c2b2bf55 > src/test/python/apache/aurora/client/cli/util.py 1fa1207d9380e57ac77d2aa24725b9ac39c83d4c > > Diff: https://reviews.apache.org/r/29698/diff/ > > > Testing > ------- > > In vagrant: > ``` > vagrant@192:~$ aurora > usage: aurora [-h] {task,quota,cron,job,config,sla,beta-update} ... > > optional arguments: > -h, --help show this help message and exit > > commands: > {task,quota,cron,job,config,sla,beta-update} > task Work with a task running in an Apache Aurora cluster > quota Work with quota settings for an Apache Aurora cluster > cron Work with entries in the aurora cron scheduler > job Work with an aurora job > config Work with an aurora configuration file > sla Work with SLA data in Aurora cluster. > beta-update Interact with the aurora update service. > > > vagrant@192:~$ aurora -h > usage: aurora [-h] {task,quota,cron,job,config,sla,beta-update} ... > > optional arguments: > -h, --help show this help message and exit > > commands: > {task,quota,cron,job,config,sla,beta-update} > task Work with a task running in an Apache Aurora cluster > quota Work with quota settings for an Apache Aurora cluster > cron Work with entries in the aurora cron scheduler > job Work with an aurora job > config Work with an aurora configuration file > sla Work with SLA data in Aurora cluster. > beta-update Interact with the aurora update service. > > > vagrant@192:~$ aurora task > usage: aurora task [-h] {run,ssh} ... > aurora task: error: too few arguments > > > vagrant@192:~$ aurora task -h > usage: aurora task [-h] {run,ssh} ... > > optional arguments: > -h, --help show this help message and exit > > subcommands: > {run,ssh} > run runs a shell command on machines currently hosting instances of > a single job. This feature supports the same command line > wildcards that are used to populate a job's commands. This means > anything in the {{mesos.*}} and {{thermos.*}} namespaces. > ssh initiates an SSH session on the machine that a task instance is > running on. > > > vagrant@192:~$ aurora task run -h > usage: aurora task run [-h] [--threads NUM_THREADS] [--ssh-user ssh_username] > [--executor-sandbox] [--verbose] > [--skip-hooks hook,hook,...] > CLUSTER/ROLE/ENV/NAME[/INSTANCES] unix_command_line > > positional arguments: > CLUSTER/ROLE/ENV/NAME[/INSTANCES] > Fully specified job instance key, in > CLUSTER/ROLE/ENV/NAME[/INSTANCES] format. If INSTANCES > is omitted, then all instances will be operated on. > unix_command_line > > optional arguments: > -h, --help show this help message and exit > --threads NUM_THREADS, -t NUM_THREADS > Number of threads to use > --ssh-user ssh_username, -l ssh_username > ssh as this username instead of the job's role > --executor-sandbox Run the command in the executor sandbox instead of the > task sandbox > --verbose, -v Show verbose output > --skip-hooks hook,hook,... > A comma-separated list of command hook names that > should be skipped. If the hooks cannot be skipped, > then the command will be aborted > > ``` > > > Thanks, > > Bill Farner > > --===============2628241035500851643==--