You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Job-runner refers to files by the absolute paths. If the absolute path gets longer than 260 characters then Windows can't see the file anymore and jobs will die with a confusing Internal Error message.
It's not an identical issue because whether we hit the length limit with a given file depends on its absolute path, which is a property of where the repo happens to be checked out locally and so can't be validated purely with respect to the project contents.
We could possibly chdir to the project root and refer to files using relative paths. That's a bit awkward but has the advantage that we could do that consistently for all platforms and not have to special case the Windows behaviour. We'd still need to validate that the relative path didn't exceed 260 chars, but that could be enforced along with the other rules in #307.
If we can't work around this issue then, at a minimum, we should try to detect when we've hit it and raise more helpful errors messages.
The text was updated successfully, but these errors were encountered:
Job-runner refers to files by the absolute paths. If the absolute path gets longer than 260 characters then Windows can't see the file anymore and jobs will die with a confusing Internal Error message.
Example Slack thread here:
https://bennettoxford.slack.com/archives/C01D7H9LYKB/p1674465474403359
This is related to, but not identical with:
It's not an identical issue because whether we hit the length limit with a given file depends on its absolute path, which is a property of where the repo happens to be checked out locally and so can't be validated purely with respect to the project contents.
It might be possible to work around this using some magic prefix
\\?\
:https://learn.microsoft.com/en-gb/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#win32-file-namespaces
But we'd need to make sure all our file interactions tested whether we're running on Windows and applied this consistently.
On Windows 10 there's some registry entry you can set to enable long path support, but I don't think this is a viable option for our userbase:
https://docs.python.org/3/using/windows.html#removing-the-max-path-limitation
We could possibly chdir to the project root and refer to files using relative paths. That's a bit awkward but has the advantage that we could do that consistently for all platforms and not have to special case the Windows behaviour. We'd still need to validate that the relative path didn't exceed 260 chars, but that could be enforced along with the other rules in #307.
If we can't work around this issue then, at a minimum, we should try to detect when we've hit it and raise more helpful errors messages.
The text was updated successfully, but these errors were encountered: