You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Armand Grillet <ag...@mesosphere.io> on 2018/10/10 11:11:23 UTC

Review Request 68971: Added pylint init-hook to add Mesos library to `PYTHONPATH`.

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

Review request for mesos and Kevin Klues.


Bugs: MESOS-6551
    https://issues.apache.org/jira/browse/MESOS-6551


Repository: mesos


Description
-------

Without this change, adding `from mesos.exceptions import
MesosException` to a file in the new CLI returns `E0401:
Unable to import 'mesos.exceptions' (import-error)`.

This is because the Mesos library is a local module that we need to add
to the `PYTHONPATH`. This is already done when using the virtual
environment of the new CLI and we now also do it when linting.


Diffs
-----

  support/pylint.config af25dd90cb2d467c688ea4b060dc4640040a068b 


Diff: https://reviews.apache.org/r/68971/diff/1/


Testing
-------

Updated the agent plugin to do `from mesos.exceptions import MesosException` and use `MesosException`. Commited to see the git hook running and saw the error `E0401: Unable to import 'mesos.exceptions' (import-error).`. Updated `support/pylint.config`, run the git hook again and saw that the error was gone.


Thanks,

Armand Grillet


Re: Review Request 68971: Added pylint init-hook to add Mesos library to `PYTHONPATH`.

Posted by Mesos Reviewbot Windows <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68971/#review209403
-----------------------------------------------------------



FAIL: Some of the unit tests failed. Please check the relevant logs.

Reviews applied: `['68971']`

Failed command: `Start-MesosCITesting`

All the build artifacts available at: http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2445/mesos-review-68971

Relevant logs:

- [mesos-tests.log](http://dcos-win.westus2.cloudapp.azure.com/artifacts/mesos-reviewbot-testing/2445/mesos-review-68971/logs/mesos-tests.log):

```
I1010 12:15:27.519279 28376 executor.cpp:918] Sending SIGTERM to process tree at pid 28work 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-0000 (latest state: TASK_KILLED, status update state: TASK_KILLED)
I1010 12:15:27.517290 33352 slave.cpp:6640] Shutting down executor 'aab7c622-0137-4216-987a-fa30153e3a82' of framework 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-0000 at executor(1)@192.10.1.5:61645
I1010 12:15:27.519279 33352 slave.cpp:909] Agent terminating
W1010 12:15:27.519279 33352 slave.cpp:3917] Ignoring shutdown framework 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-0000 because it is terminating
I1010 12:15:27.519279 30124 master.cpp:11030] Removing task aab7c622-0137-4216-987a-fa30153e3a82 with resources cpus(allocated: *):4; mem(allocated: *):2048; disk(allocated: *):1024; ports(allocated: *):[31000-32000] of framework 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-0000 on agent 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-S0 at slave(461)@192.10.1.5:59867 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I1010 12:15:27.521296 21816 master.cpp:1251] Agent 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-S0 at slave(461)@192.10.1.5:59867 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net) disconnected
I1010 12:15:27.521296 21816 master.cpp:3267] Disconnecting agent 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-S0 at slave(461)@192.10.1.5:59867 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I1010 12:15:27.522272 21816 master.cpp:3286] Deactivating agent 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-S0 at slave(461)@192.10.1.5:59867 (windows-02.aa0q4n2kgcyefckmv0xukjvy4f.xx.internal.cloudapp.net)
I1010 12:15:27.522272 32756 hierarchical.cpp:359] Removed framework 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-0000
I1010 12:15:27.522272 32756 hierarchical.cpp:803] Agent 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-S0 deactivated
I1010 12:15:27.523303 21816 containerizer.cpp:2455] Destroying container 763fffdf-18cc-40e8-a004-f0237832f4d2 in RUNNING state
I1010 12:15:27.523303 21816 containerizer.cpp:3122] Transitioning the state of container 763fffdf-18cc-40e8-a004-f0237832f4d2 from RUNNING to DESTROYING
I1010 12:15:27.524273 21816 l[       OK ] IsolationFlag/MemoryIsolatorTest.ROOT_MemUsage/0 (588 ms)
[----------] 1 test from IsolationFlag/MemoryIsolatorTest (606 ms total)

[----------] Global test environment tear-down
[==========] 1051 tests from 103 test cases ran. (486030 ms total)
[  PASSED  ] 1050 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] DockerFetcherPluginTest.INTERNET_CURL_FetchBlob

 1 FAILED TEST
  YOU HAVE 232 DISABLED TESTS

auncher.cpp:166] Asked to destroy container 763fffdf-18cc-40e8-a004-f0237832f4d2
I1010 12:15:27.532269 30568 containerizer.cpp:2961] Container 763fffdf-18cc-40e8-a004-f0237832f4d2 has exited
I1010 12:15:27.561275 28116 master.cpp:1093] Master terminating
I1010 12:15:27.562273 32964 hierarchical.cpp:645] Removed agent 9ff01ed5-975a-49dd-a0e3-0c609b1ca8a3-S0
I1010 12:15:28.006341 33012 process.cpp:926] Stopped the socket accept loop
```

- Mesos Reviewbot Windows


On Oct. 10, 2018, 11:11 a.m., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68971/
> -----------------------------------------------------------
> 
> (Updated Oct. 10, 2018, 11:11 a.m.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-6551
>     https://issues.apache.org/jira/browse/MESOS-6551
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Without this change, adding `from mesos.exceptions import
> MesosException` to a file in the new CLI returns `E0401:
> Unable to import 'mesos.exceptions' (import-error)`.
> 
> This is because the Mesos library is a local module that we need to add
> to the `PYTHONPATH`. This is already done when using the virtual
> environment of the new CLI and we now also do it when linting.
> 
> 
> Diffs
> -----
> 
>   support/pylint.config af25dd90cb2d467c688ea4b060dc4640040a068b 
> 
> 
> Diff: https://reviews.apache.org/r/68971/diff/1/
> 
> 
> Testing
> -------
> 
> Updated the agent plugin to do `from mesos.exceptions import MesosException` and use `MesosException`. Commited to see the git hook running and saw the error `E0401: Unable to import 'mesos.exceptions' (import-error).`. Updated `support/pylint.config`, run the git hook again and saw that the error was gone.
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 68971: Moved import of '../lib' from new CLI bootstrap to pip-requirements.txt.

Posted by Kevin Klues <kl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68971/#review209615
-----------------------------------------------------------


Ship it!




Ship It!

- Kevin Klues


On Okt. 16, 2018, 11:33 vorm., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68971/
> -----------------------------------------------------------
> 
> (Updated Okt. 16, 2018, 11:33 vorm.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-8795
>     https://issues.apache.org/jira/browse/MESOS-8795
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This adds the Mesos Python package to the requirements needed by the
> new CLI. We were previously adding the path to the package when setting
> up the CLI virtual environment but this does not work with Pylint when
> it is run from the linters virtual environment.
> 
> By setting things in `pip-requirements.txt`, Pylint does not report
> inexisting linting errors when doing imports such as `import mesos`.
> 
> 
> Diffs
> -----
> 
>   src/python/cli_new/bootstrap a6183d4c28281bf6d29c8b7f825ae474056f027b 
>   src/python/cli_new/pip-requirements.txt d1822bf752ce76aa5da5999057fe1efb83747fd0 
> 
> 
> Diff: https://reviews.apache.org/r/68971/diff/3/
> 
> 
> Testing
> -------
> 
> Updated the agent plugin to do `from mesos.exceptions import MesosException` and use `MesosException`. Commited to see the git hook running and saw the error `E0401: Unable to import 'mesos.exceptions' (import-error).`. Updated `support/pylint.config`, run the git hook again and saw that the error was gone.
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


Re: Review Request 68971: Moved import of '../lib' from new CLI bootstrap to pip-requirements.txt.

Posted by Armand Grillet <ag...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/68971/
-----------------------------------------------------------

(Updated Oct. 16, 2018, 1:33 p.m.)


Review request for mesos and Kevin Klues.


Changes
-------

Rebased.


Bugs: MESOS-6551
    https://issues.apache.org/jira/browse/MESOS-6551


Repository: mesos


Description (updated)
-------

This adds the Mesos Python package to the requirements needed by the
new CLI. We were previously adding the path to the package when setting
up the CLI virtual environment but this does not work with Pylint when
it is run from the linters virtual environment.

By setting things in `pip-requirements.txt`, Pylint does not report
inexisting linting errors when doing imports such as `import mesos`.


Diffs (updated)
-----

  src/python/cli_new/bootstrap a6183d4c28281bf6d29c8b7f825ae474056f027b 
  src/python/cli_new/pip-requirements.txt d1822bf752ce76aa5da5999057fe1efb83747fd0 


Diff: https://reviews.apache.org/r/68971/diff/3/

Changes: https://reviews.apache.org/r/68971/diff/2-3/


Testing
-------

Updated the agent plugin to do `from mesos.exceptions import MesosException` and use `MesosException`. Commited to see the git hook running and saw the error `E0401: Unable to import 'mesos.exceptions' (import-error).`. Updated `support/pylint.config`, run the git hook again and saw that the error was gone.


Thanks,

Armand Grillet