My edge case was weird, but still valid -- the original job created a directory, say alias/directory/jobname/ with a symlink inside, pointing to work directory, i.e alias/directory/jobname/something -> work/....,
Then, the second version of that job wanted to actually create/update the alias alias/directory/jobname -> work/....
The test os.path.symlink() was therefore against alias/directory/jobname and that correctly returned False. However, I think that was processed as "does not exist" and directory was not unlinked/deleted.
Maybe checking for existence would be more appropriate? Not sure.
|
if os.path.islink(alias) and os.path.realpath(alias) != os.path.realpath(target): |
My edge case was weird, but still valid -- the original job created a directory, say alias/directory/jobname/ with a symlink inside, pointing to work directory, i.e
alias/directory/jobname/something -> work/....,Then, the second version of that job wanted to actually create/update the alias
alias/directory/jobname -> work/....The test os.path.symlink() was therefore against
alias/directory/jobnameand that correctly returned False. However, I think that was processed as "does not exist" and directory was not unlinked/deleted.Maybe checking for existence would be more appropriate? Not sure.
sisyphus/sisyphus/manager.py
Line 722 in b380df2