Skip to content
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

Disallow nested installation dirs #4396

Closed
MetRonnie opened this issue Sep 8, 2021 · 2 comments · Fixed by #4442
Closed

Disallow nested installation dirs #4396

MetRonnie opened this issue Sep 8, 2021 · 2 comments · Fixed by #4442
Assignees
Labels
could be better Not exactly a bug, but not ideal.
Milestone

Comments

@MetRonnie
Copy link
Member

MetRonnie commented Sep 8, 2021

Somewhat related to #4394

We should probably not allow installation into a subdir of an installation dir (a dir that contains _cylc-install). E.g. if you have

~/cylc-run
`-- foo
    |-- _cylc-install
    `-- run1

then you should not be able to do cylc install --flow-name foo/bar because this will result in nested installation dirs:

~/cylc-run
`-- foo
    |-- _cylc-install
    |-- run1
    `-- bar
        |-- _cylc-install
        `-- run1

(here we have the installation dir foo/bar nested inside the installation dir foo.

Note that nested run dirs are already disallowed. We might be able to modify this function for installation dirs:

def check_nested_run_dirs(run_dir: Union[Path, str], flow_name: str) -> None:

Pull requests welcome!
This is an Open Source project - please consider contributing a bug fix
yourself (please read CONTRIBUTING.md before starting any work though).

@MetRonnie MetRonnie added question Flag this as a question for the next Cylc project meeting. could be better Not exactly a bug, but not ideal. labels Sep 8, 2021
@MetRonnie MetRonnie added this to the cylc-8.0.0 milestone Sep 8, 2021
@oliver-sanders
Copy link
Member

Note that the run dirs aren't themselves nested so this isn't a problem for workflow identification. The issue is the mapping of run and src dirs provided by the _cylc-install/source symlink.

@hjoliver
Copy link
Member

Decision: don't allow nesting. Checking has to go up and down.

@hjoliver hjoliver removed the question Flag this as a question for the next Cylc project meeting. label Sep 10, 2021
@wxtim wxtim self-assigned this Sep 27, 2021
@wxtim wxtim mentioned this issue Sep 30, 2021
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
could be better Not exactly a bug, but not ideal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants