Skip to content

Warn at probe time on SDK/worker Python minor mismatch#60

Merged
rajeeja merged 1 commit into
mainfrom
rajeeja/python-version-warning
Jun 9, 2026
Merged

Warn at probe time on SDK/worker Python minor mismatch#60
rajeeja merged 1 commit into
mainfrom
rajeeja/python-version-warning

Conversation

@rajeeja

@rajeeja rajeeja commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • `probe_endpoint_worker` (i.e. `uxarray-mcp doctor`) now compares the SDK's Python minor version to the worker's. On mismatch, the probe payload includes a warning naming the exact fix (`uv tool install --python uxarray-mcp`).
  • Preserves the existing `payload["warning"]` string for back-compat; adds `payload["warnings"]` (list) for clients that want all warnings.
  • `docs/operating-an-endpoint.md` quickstart gains a "pick the worker Python deliberately" callout. Example conda env bumped `python=3.11` → `python=3.12` to match what HPC sites ship today.

Why

Hit this myself on chrysalis today: high-level MCP tools (`inspect_mesh_remote`, `calculate_area_remote`) survived a 3.13 → 3.12 SDK/worker skew because they route through `AllCodeStrategies`, but a raw `Executor.submit()` from a one-off script blew up with `WorkerLost`. The error message Globus Compute prints is generic enough that it took 30 minutes to recognize the root cause. Surfacing the mismatch at probe time means the next person sees the fix command directly.

Test plan

  • `uv run pre-commit run`: clean
  • `uv run pytest tests/ --ignore=tests/test_remote_agent.py`: 290 passed, 5 pre-existing skips
  • Sphinx `-W --keep-going`: clean
  • Live verification of the new warning text against a real version-mismatched endpoint is out of scope for this PR (no test infrastructure for mixing SDK Pythons in CI).

probe_endpoint_worker (used by `uxarray-mcp doctor`) now compares the
submitter's Python minor version to the worker's reported version. When they
differ, the probe payload gains a warning explaining that high-level MCP
tools survive the skew via AllCodeStrategies but raw Executor.submit() calls
will hit pickle protocol errors and WorkerLost.

The single existing PYTHONPATH warning is preserved for back-compat under
payload["warning"] and the new accumulator also exposes payload["warnings"]
as a list for clients that want both.

Docs: docs/operating-an-endpoint.md gains a callout in the solo personal
quickstart explaining the same constraint and pointing at the doctor
warning. The example conda env is also bumped from python=3.11 to
python=3.12 to match what most HPC sites ship today.

Rationale: tripped on this myself today while running an inline
Executor.submit(_ls, ...) against chrysalis from a 3.13 laptop against a
3.12 worker. Surfacing it at probe time would have saved 30 minutes of
diagnosis.
@rajeeja rajeeja merged commit 2aa5c64 into main Jun 9, 2026
9 checks passed
@rajeeja rajeeja deleted the rajeeja/python-version-warning branch June 9, 2026 19:47
@rajeeja rajeeja mentioned this pull request Jun 9, 2026
4 tasks
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.

1 participant