-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66697/#review201464
-----------------------------------------------------------
Master (ad0bc5f) is red with this patch.
./build-support/jenkins/build.sh
+from .util import AuroraClientCommandTest
+
from gen.apache.aurora.api.constants import AURORA_EXECUTOR_NAME
-
-from .util import AuroraClientCommandTest
class TestInspectCommand(AuroraClientCommandTest):
21:18:40 00:04 [complete]
SUCCESS
+ ./build-support/python/checkstyle-check
21:18:44 00:00 [main]
(To run a reporting server: ./pants server)
21:18:44 00:00 [setup]
21:18:45 00:01 [parse]
Executing tasks in goals: lint
21:18:45 00:01 [lint]
21:18:45 00:01 [python-eval]
21:18:45 00:01 [pythonstyle]
21:18:45 00:01 [cache]
No cached artifacts for 48 targets.
Invalidated 48 targets.
E501:ERROR
PythonFile(src/test/python/apache/aurora/client/cli/test_task.py):153 line too
long (137 > 100 characters)
| cmd.execute(['task', 'ssh',
'--pid-file={}'.format(pid_file.name), '--ssh-options=-v',
'west/bozo/test/hello/1', '--command=ls'])
T100:ERROR src/main/python/apache/aurora/client/cli/task.py:163 Indentation
of 4 instead of 2
| with open(context.options.pid_file, "w") as f:
T100:ERROR src/main/python/apache/aurora/client/cli/task.py:164 Indentation
of 4 instead of 2
| f.write(str(process.pid))
FAILURE: 3 Python Style issues found. You may try `./pants fmt <targets>`
21:19:05 00:21 [complete]
FAILURE
I will refresh this build result if you post a review containing "@ReviewBot
retry"
- Aurora ReviewBot
On April 18, 2018, 8:55 p.m., Sameer Brenn wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66697/
> -----------------------------------------------------------
>
> (Updated April 18, 2018, 8:55 p.m.)
>
>
> Review request for Aurora, Joshua Cohen and Zameer Manji.
>
>
> Repository: aurora
>
>
> Description
> -------
>
> My team has some scripts to start devel shards which create tunnels:
>
> ```
> aurora task ssh -L 8002:http --ssh-options "-f -N"
> "$DC/$USER/devel/proxyapp/0"
> aurora task ssh -L 9002:health --ssh-options "-f -N"
> "$DC/$USER/devel/proxyapp/0"
> ```
>
> We use fixed local port numbers because that way we can run dependent
> services locally that look for locally-running copies of the
> same service on a fixed port, but then those requests get tunnelled through
> to the devel shard.
>
> When the devel shard is restarted, however, the tunnel is still running so
> the subsequent call to create a new tunnel fails because
> it can't bind to the fixed port.
>
> If we save the SSH process PID to a file, we can then kill existing tunnel to
> the old instance before starting up the new tunnel to the
> new instance.
>
>
> Diffs
> -----
>
> src/main/python/apache/aurora/client/cli/task.py
> 652a545072f161dbf854b3d6d273809b09d142e8
> src/test/python/apache/aurora/client/cli/test_task.py
> a543d4a101c58149f8af265257d061ff5032049c
>
>
> Diff: https://reviews.apache.org/r/66697/diff/1/
>
>
> Testing
> -------
>
> ```
> $ ./pants test src/test/python/apache/aurora/client::
> ```
>
> And when applying the same patch to our local repo at Twitter:
>
> ```
> $ ./pants run
> twitter/src/main/python/twitter/aurora/client/cli_internal:aurora_internal --
> task ssh -L 8005:http --ssh-options "-n -N" --pid-file /tmp/p
> "smf1/sbrenn/devel/proxyapp/0" &
> $ ps -p `cat /tmp/p`
> PID TTY TIME CMD
> 34729 ttys000 0:00.05 ssh -t -n -N -L
> 8005:smf1-aki-27-sr1.prod.twitter.com:31794
> [email protected] cd
> /var/lib/mesos/slaves/*/frameworks/*/exec
> ```
>
>
> Thanks,
>
> Sameer Brenn
>
>