> On Jan. 8, 2015, 6:50 p.m., Kevin Sweeney wrote:
> > src/main/python/apache/aurora/client/cli/task.py, line 83
> > <https://reviews.apache.org/r/29698/diff/1/?file=811543#file811543line83>
> >
> > since these aren't multiline anymore you don't need the triple quotes.
> > In fact, you can do
> >
> > ```py
> > help = "..."
> > ```
> >
> > instead of @property.
>
> Bill Farner wrote:
> Good catch on both, changed throughout.
Scratch that - this causes checkstyle to bark with
```
T001:ERROR src/main/python/apache/aurora/client/cli/jobs.py:402 Class globals
must be UPPER_SNAKE_CASED
| help = "Open a job's scheduler page in the web browser."
```
Punting to you if you would like to follow up. Personally, i'm happy to leave
this alone since it will disappear when we remove the class hierarchy here.
- Bill
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29698/#review67248
-----------------------------------------------------------
On Jan. 8, 2015, 3:33 a.m., Bill Farner wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29698/
> -----------------------------------------------------------
>
> (Updated Jan. 8, 2015, 3:33 a.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
> -----
>
> 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/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
>
>