Skip to content

Edge case when the update of alias fails #299

Description

@jtrmal

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):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions