Skip to content

Fix more pythonpath stuff#3188

Merged
romain-intel merged 3 commits into
masterfrom
romain/worktree/add_files
May 11, 2026
Merged

Fix more pythonpath stuff#3188
romain-intel merged 3 commits into
masterfrom
romain/worktree/add_files

Conversation

@romain-intel

Copy link
Copy Markdown
Contributor

No description provided.

@romain-intel
romain-intel force-pushed the romain/worktree/add_files branch from 461ed97 to f9cbaff Compare May 8, 2026 20:34
@romain-intel
romain-intel marked this pull request as ready for review May 8, 2026 20:35
@greptile-apps

greptile-apps Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR simplifies PYTHONPATH construction in the env-escape client by assigning env["PYTHONPATH"] = pythonpath directly instead of merging with a saved MF_ORIG_PYTHONPATH, and bumps test dependency versions for numpy and scikit-learn.

  • client.py: Removes the multi-part os.pathsep.join logic that combined the pythonpath argument with a saved MF_ORIG_PYTHONPATH value; the pythonpath argument is now used as-is, meaning callers are expected to already include any original path components before passing to Client.
  • complex_dag_flow.py: Updates conda library pins — numpy 2.1.12.2.0 and scikit-learn 1.3.01.5.0 — in the spin test flow.

Confidence Score: 4/5

The core logic change in client.py is straightforward, but the removal of env.pop("MF_ORIG_PYTHONPATH", "") (flagged in an existing review thread) means that variable is now forwarded unstripped to the server subprocess.

The PYTHONPATH simplification itself is clean, but the existing thread on MF_ORIG_PYTHONPATH leaking into the server's environment is an unresolved concern that warrants attention before merging. The test dependency bumps are safe.

metaflow/plugins/env_escape/client.py — specifically around the env variable cleanup logic for MF_ORIG_PYTHONPATH.

Important Files Changed

Filename Overview
metaflow/plugins/env_escape/client.py Simplifies PYTHONPATH construction to use the pythonpath argument directly instead of merging with MF_ORIG_PYTHONPATH; removes the env.pop("MF_ORIG_PYTHONPATH", "") call, leaving that variable unstripped from the server's environment.
test/unit/spin/flows/complex_dag_flow.py Bumps numpy from 2.1.1 to 2.2.0 and scikit-learn from 1.3.0 to 1.5.0 in test conda dependencies.

Reviews (3): Last reviewed commit: "Re-add PYTHONPATH setting" | Re-trigger Greptile

Comment thread metaflow/plugins/env_escape/client.py
@romain-intel
romain-intel requested a review from talsperre May 8, 2026 20:58
numpy 2.1.1 → 2.2.0 and scikit-learn 1.3.0 → 1.5.0. Both older versions
may no longer be available on the Netflix conda mirror; the newer versions
are current stable releases that are mutually compatible.
@romain-intel
romain-intel force-pushed the romain/worktree/add_files branch from f9cbaff to d176d70 Compare May 11, 2026 18:56
@romain-intel
romain-intel merged commit 0cd7a61 into master May 11, 2026
42 checks passed
@romain-intel
romain-intel deleted the romain/worktree/add_files branch May 11, 2026 23:34
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