Fix import-dir logging for notebooks in subdirectories on Windows#4250
Merged
Fix import-dir logging for notebooks in subdirectories on Windows#4250
Conversation
…indows When importing notebooks from subdirectories on Windows, the log output showed incorrect paths with backslashes instead of forward slashes. Example buggy output: subdir\nested\notebook.py -> /Users/.../subdir\nested\notebook Expected output: subdir\nested\notebook.py -> /Users/.../subdir/nested/notebook The bug was in lines 74-75 of import_dir.go where path.Ext() and strings.TrimSuffix() operated on localName (with backslashes) instead of remoteName (already converted to forward slashes via filepath.ToSlash). Tested on Windows 10 (10.0.26100.7462) with nested notebook files. Root-level notebooks were unaffected. The actual import operation worked correctly in both versions - only log output was impacted.
Collaborator
|
Commit: 9600ddf
28 interesting tests: 17 KNOWN, 8 RECOVERED, 2 FAIL, 1 SKIP
Top 23 slowest tests (at least 2 minutes):
|
shreyas-goenka
approved these changes
Jan 12, 2026
Collaborator
|
Commit: d0a9eb1
39 interesting tests: 13 KNOWN, 12 RECOVERED, 8 FAIL, 3 BUG, 2 flaky, 1 SKIP
Top 50 slowest tests (at least 2 minutes):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
When importing notebooks from subdirectories on Windows, the log output showed incorrect paths with backslashes instead of forward slashes.
Example buggy output:
Expected output:
The bug was in lines 74-75 of import_dir.go where path.Ext() and strings.TrimSuffix() operated on localName (with backslashes) instead of remoteName (already converted to forward slashes via filepath.ToSlash).
Why
Found this while investigating the
TestImportDirfailures.Tests
Tested on Windows 10 (10.0.26100.7462) with nested notebook files. Root-level notebooks were unaffected. The actual import operation worked correctly in both versions - only log output was impacted.