Skip to content

fix: filter out WSL Windows drive mount paths in conda locator (Fixes #369)#370

Merged
karthiknadig merged 2 commits intomainfrom
bug/issue-369
Mar 5, 2026
Merged

fix: filter out WSL Windows drive mount paths in conda locator (Fixes #369)#370
karthiknadig merged 2 commits intomainfrom
bug/issue-369

Conversation

@karthiknadig
Copy link
Member

On WSL2, ~/.conda/environments.txt is shared with the Windows host and contains paths like /mnt/d/Tools/Anaconda/envs/... that point to Windows PE executables unusable from Linux. PET would try to find a conda manager for each, fail, and log ERROR for every environment — causing log spam and ~6s overhead.

Changes:

  • Add is_windows_drive_mount() helper (Unix-only) to detect /mnt/<drive>/... paths
  • Add is_wsl() helper using /proc/version WSL signature detection with result caching
  • Filter out Windows drive mount paths early in get_conda_environment_paths() before expensive scanning
  • Unit tests for the path matching logic (Unix-gated)

Fixes #369

@karthiknadig karthiknadig requested a review from Copilot March 5, 2026 16:54
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Test Coverage Report (Linux)

Metric Value
Current Coverage 64.1%
Base Branch Coverage 64.0%
Delta .1% ✅

Coverage increased! Great work!

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Performance Report (Linux) ➖

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 1ms 1ms 1ms 0ms 0%
Full Refresh 99ms 485ms 97ms 2ms 0%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Performance Report (Windows) ✅

Metric PR (P50) PR (P95) Baseline (P50) Delta Change
Server Startup 9ms 15ms 11ms -2ms -18.2%
Full Refresh 163ms 1602ms 229ms -66ms -28.8%

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Test Coverage Report (Windows)

Metric Value
Current Coverage 60.21%
Base Branch Coverage 60.21%
Delta 0% ➖

Coverage unchanged.

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Performance Report (macOS)

Metric PR (P50) PR (P95) Baseline (P50) Delta
Server Startup 67ms 623ms 51ms 16ms
Full Refresh 130ms 29717ms 102ms 28ms

Results based on 10 iterations. P50 = median, P95 = 95th percentile.


Legend
  • 🚀 Significant speedup (>100ms faster)
  • ✅ Faster than baseline
  • ➖ No significant change
  • 🔺 Slower than baseline (>100ms)
  • ⚠️ Significant slowdown (>500ms)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@karthiknadig karthiknadig requested a review from Copilot March 5, 2026 18:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@karthiknadig karthiknadig enabled auto-merge (squash) March 5, 2026 19:40
@karthiknadig karthiknadig merged commit 72123ab into main Mar 5, 2026
30 checks passed
@karthiknadig karthiknadig deleted the bug/issue-369 branch March 5, 2026 21:44
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.

PET conda locator fails to find conda manager for Windows conda installations accessed via WSL /mnt/ paths

3 participants