-
Notifications
You must be signed in to change notification settings - Fork 3
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
Make app more robust against current-directory index-number changes #1483
Comments
With upcoming pull request, we solved the error from #1478 but we found a similar error related to Task collection (collecting
|
Merged
2 tasks
For the record, we are not currently covering this one as part of #1497. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The most likely explanation we found for #1478 was a change in the current-working-directory index number, probably due to an export of the NFS shares where
fractal-server
runs. Note that we cannot verify the old index number any more.This scenario is not expected, but we can still partly mitigate it. The specific issue in #1478 was with the
Path.resolve
function, which then callsos.getcwd()
as part of its internals. We useresolve()
in very few modules, and it's likely that we could alwaysreplace it withremove it (or, when we cannot, these are parts of the code that would probably run at startup - when the folder definitely hasn't changed index number yet). This change would mitigate the issue in #1478.as_posix()
To debug:
cd
into a temporary foldertmp1
and startfractal-server
from there (first take a note of the results ofls -ila
, where-i
prints the index number)cd ..
,cp -r tmp1 tmp2
,rm -r tmp1
,mv tmp2 tmp1
. If we nowcd
intotmp1
and runls -ila
, we'll find a different index numberfractal-server
, and see what goes wrong.If we find other parts of the code that rely on the current working directory, we should check whether it's easy to replace them with equivalent robust versions.
Higher level advice:
The text was updated successfully, but these errors were encountered: