Skip to content

Log client addresses in scheduler lifecycle messages#9270

Open
peter941221 wants to merge 6 commits into
dask:mainfrom
peter941221:feat/issue-8000-client-address-logs
Open

Log client addresses in scheduler lifecycle messages#9270
peter941221 wants to merge 6 commits into
dask:mainfrom
peter941221:feat/issue-8000-client-address-logs

Conversation

@peter941221

Copy link
Copy Markdown
Contributor

Summary

  • include the client's remote address in the scheduler log messages for client connect, remove, and close events
  • store the peer address on ClientState so the same address is available throughout the client lifecycle
  • add a scheduler test covering the new log output

Closes #8000

Testing

  • python -m py_compile distributed/scheduler.py distributed/tests/test_scheduler.py
  • not run: python -m pytest distributed/tests/test_scheduler.py -k client_connection_logs_include_address (local environment is missing dask, so pytest fails during config import)

@github-actions

github-actions Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    40 files  +     9      40 suites  +9   14h 10m 21s ⏱️ + 3h 22m 3s
 4 154 tests +    80   3 972 ✅ +     2    178 💤 +   74  4 ❌ +4 
80 839 runs  +21 708  76 598 ✅ +19 900  4 236 💤 +1 803  5 ❌ +5 

For more details on these failures, see this check.

Results for commit 7e97188. ± Comparison against base commit d8fabe2.

This pull request removes 22 and adds 102 tests. Note that renamed tests count towards both.
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[0,1]
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[1,0]
distributed.diagnostics.tests.test_nvml ‑ test_enable_disable_nvml
distributed.diagnostics.tests.test_nvml ‑ test_gpu_metrics
distributed.diagnostics.tests.test_nvml ‑ test_gpu_monitoring_range_query
distributed.diagnostics.tests.test_nvml ‑ test_gpu_monitoring_recent
distributed.diagnostics.tests.test_nvml ‑ test_has_cuda_context
distributed.diagnostics.tests.test_nvml ‑ test_one_time
distributed.diagnostics.tests.test_nvml ‑ test_one_visible_devices
distributed.diagnostics.tests.test_nvml ‑ test_visible_devices_bad_uuid
…
distributed.cli.tests.test_dask_scheduler ‑ test_uvloop
distributed.cli.tests.test_dask_spec ‑ test_uvloop
distributed.cli.tests.test_dask_worker ‑ test_stray_positional_hints_at_help_and_preload
distributed.cli.tests.test_dask_worker ‑ test_unknown_option_reports_no_such_option
distributed.cli.tests.test_dask_worker ‑ test_uvloop[--nanny]
distributed.cli.tests.test_dask_worker ‑ test_uvloop[--no-nanny]
distributed.deploy.tests.test_old_ssh ‑ test_cluster
distributed.deploy.tests.test_ssh ‑ test_defer_to_old
distributed.deploy.tests.test_ssh ‑ test_old_ssh_with_local_dir
distributed.diagnostics.tests.test_task_stream ‑ test_collect_start_index
…
This pull request removes 13 skipped tests and adds 88 skipped tests. Note that renamed tests count towards both.
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[0,1]
distributed.diagnostics.tests.test_nvml ‑ test_2_visible_devices[1,0]
distributed.diagnostics.tests.test_nvml ‑ test_gpu_metrics
distributed.diagnostics.tests.test_nvml ‑ test_gpu_monitoring_range_query
distributed.diagnostics.tests.test_nvml ‑ test_gpu_monitoring_recent
distributed.diagnostics.tests.test_nvml ‑ test_has_cuda_context
distributed.diagnostics.tests.test_nvml ‑ test_one_time
distributed.diagnostics.tests.test_nvml ‑ test_one_visible_devices
distributed.diagnostics.tests.test_nvml ‑ test_visible_devices_bad_uuid
distributed.diagnostics.tests.test_nvml ‑ test_visible_devices_uuid
…
distributed.deploy.tests.test_old_ssh ‑ test_cluster
distributed.deploy.tests.test_ssh ‑ test_old_ssh_with_local_dir
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-f4-shape0]
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-f4-shape1]
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-f4-shape2]
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-f4-shape3]
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-f4-shape4]
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-u1-shape0]
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-u1-shape1]
distributed.protocol.tests.test_numba ‑ test_serialize_numba[serializers0-C-u1-shape2]
…

♻️ This comment has been updated with latest results.

@peter941221 peter941221 marked this pull request as ready for review May 29, 2026 10:17
@peter941221 peter941221 requested a review from fjetter as a code owner May 29, 2026 10:17
Comment thread distributed/tests/test_scheduler.py Outdated
Comment thread distributed/scheduler.py Outdated
@peter941221

Copy link
Copy Markdown
Contributor Author

Current red jobs look unrelated to this patch.

This PR only changes distributed/scheduler.py and distributed/tests/test_scheduler.py, and the scheduler-specific py314 jobs are green. The red ubuntu-latest mindeps-array test-ci not ci1 job fails in distributed/tests/test_config.py::test_logging_default[None].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log address of clients in scheduler log

2 participants