-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment resolution uses UNC paths with Python 3.10, 3.7 was using mounted network drives. #1438
Comments
I would argue this should be a config. Mapped drive letters can wreck havoc in other setups, like the one we have here. We only use powershell where UNC works fine. |
It is already wrecking havoc! :) The default behaviour on something as critical as the way paths are handled should not change without huge warnings. |
I would expect that the config is used as-is and not transformed. Can you share your config (or any environment overrides) respectively? |
@instinct-vfx: There is nothing extra-ordinary here, only the |
I just did parallel installs of 2.91.0 and 2.112.0 and i can not reproduce this. Are you sure there are not other differences (one installation being python2.7 and one being python3.x maybe?) |
Hey @instinct-vfx, As I was saying in the description, I think it is related to the Python version and not Rez itself, or indirectly at least. Did you try with Python 3.7 vs 3.10? Cheers, Thomas |
Sorry, i must have skipped that on first read :( I did try with 3.9 in my case. We will need to find out which specific change at what version broke this and see what's the best way to make it behave backwards compatible. These are really tricky to detect. Next time we can detect it by adding tests, but it's unlikely to change again anytime soon i guess :/ |
And, this is the path resolve logic : https://github.com/AcademySoftwareFoundation/rez/blob/master/src/rez/utils/filesystem.py#L526 |
Great finding @yanshil! |
Confirming the behaviour on our end: C:\Users\tmansencal>rez-env python-2.7 -- python -c "import os;print(os.path.realpath('S:\\****'))"
S:\****
C:\Users\tmansencal>rez-env python-3.6 -- python -c "import os;print(os.path.realpath('S:\\****'))"
S:\****
C:\Users\tmansencal>rez-env python-3.7 -- python -c "import os;print(os.path.realpath('S:\\****'))"
S:\****
C:\Users\tmansencal>rez-env python-3.9 -- python -c "import os;print(os.path.realpath('S:\\****'))"
\\****\****\****
C:\Users\tmansencal>rez-env python-3.10 -- python -c "import os;print(os.path.realpath('S:\\****'))"
\\****\****\**** |
For completeness: |
Thanks @yanshil for jumping in! I'm not a Windows expert and I also don't have the bandwidth right now to look into this specific issue. What do you think would be the next step on this? WOUld there be a relatively easy fix to this? @instinct-vfx any opinion? |
I think we should first figure out what was the intent for using |
Here is where the rez/src/rez/resolved_context.py Lines 1807 to 1811 in 8968662
rez/src/rezplugins/package_repository/filesystem.py Lines 498 to 500 in 8968662
rez/src/rezplugins/package_repository/filesystem.py Lines 818 to 825 in 8968662
|
It seems like the intent was to resolve symlinks for Linux. The behavioural change of I would be inclined to have a specific case for Windows that resolves the path in a backward compatible way with a Config option to be able to have the new symlink and UNC path resolution for people that wants it. Using
|
From the TSC meeting: Let's try to replace all Seems introduced by #775. Will need some thinking and testing. |
Ahhh, actually I did came across with an issue related iwth UNC path, and I started a PR at that time but I didn't keep working on it. I would suggest testing should also include this |
Hello,
As we are trying to update our Rez version from 2.91, I noted that the resolution now uses UNC paths:
Rez v2.112.0
Rez v2.2.91.0
Environment
I do think that this is strictly caused by the Python difference but would be keen to know if anyone has seen that already before I start digging.
To Reproduce
Expected behavior
The mounted drive package path should be used as UNC paths wreck havoc in many CMD scripts.
Actual behavior
The UNC package path is used instead.
The text was updated successfully, but these errors were encountered: