Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Noisy wall of "Perhaps you already have a cluster running?" warnings when running pytest #510

Closed
lesteve opened this issue Jul 22, 2021 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed sprint A good issue to tackle during a sprint

Comments

@lesteve
Copy link
Member

lesteve commented Jul 22, 2021

This is annoying because you need to scroll up a lot to look at the actual useful output. There is probably a way either to catch these warnings with pytest or to ignore them at the end of the report.

pytest dask_jobqueue

Part of the output at the end of the run:

dask_jobqueue/tests/test_pbs.py::test_job_script[PBSCluster]
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 33339 instead
    warnings.warn(

dask_jobqueue/tests/test_pbs.py::test_job_script[MoabCluster]
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 40255 instead
    warnings.warn(

dask_jobqueue/tests/test_pbs.py::test_job_script[MoabCluster]
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 41619 instead
    warnings.warn(

dask_jobqueue/tests/test_pbs.py::test_config
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 45387 instead
    warnings.warn(

dask_jobqueue/tests/test_pbs.py::test_config_name_pbs_takes_custom_config
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 36611 instead
    warnings.warn(

dask_jobqueue/tests/test_pbs.py::test_adapt
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 34711 instead
    warnings.warn(

dask_jobqueue/tests/test_sge.py::test_config_name_sge_takes_custom_config
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 35511 instead
    warnings.warn(

dask_jobqueue/tests/test_sge.py::test_job_script
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 42161 instead
    warnings.warn(

dask_jobqueue/tests/test_slurm.py::test_header
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 34657 instead
    warnings.warn(

dask_jobqueue/tests/test_slurm.py::test_header
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 33211 instead
    warnings.warn(

dask_jobqueue/tests/test_slurm.py::test_header
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 33897 instead
    warnings.warn(

dask_jobqueue/tests/test_slurm.py::test_job_script
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 39487 instead
    warnings.warn(

dask_jobqueue/tests/test_slurm.py::test_job_script
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 42561 instead
    warnings.warn(

dask_jobqueue/tests/test_slurm.py::test_config_name_slurm_takes_custom_config
  /home/lesteve/miniconda3/lib/python3.9/site-packages/distributed/node.py:160: UserWarning: Port 8787 is already in use.
  Perhaps you already have a cluster running?
  Hosting the HTTP server on port 43363 instead
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
@lesteve lesteve added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers sprint A good issue to tackle during a sprint labels Jul 22, 2021
@mrocklin
Copy link
Member

mrocklin commented Jul 22, 2021 via email

@lesteve
Copy link
Member Author

lesteve commented Jul 22, 2021

Ah nice, thanks for letting me know!

I guess we can live with it a bit longer and wait for a proper solution in distributed then!

@fjetter
Copy link
Member

fjetter commented Jul 23, 2021

I guess we can live with it a bit longer and wait for a proper solution in distributed then!

If it becomes unbearable, a -Wignore:Port is a straight forward way to ignore this warning until this is fixed

@guillaumeeb
Copy link
Member

I'm closing this one as a fix should be soon available in distributed, we can live with it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed sprint A good issue to tackle during a sprint
Projects
None yet
Development

No branches or pull requests

4 participants