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

Avoid creating empty suite directories when running suites that do not exist #3097

Closed
kinow opened this issue Apr 9, 2019 · 3 comments · Fixed by #3409
Closed

Avoid creating empty suite directories when running suites that do not exist #3097

kinow opened this issue Apr 9, 2019 · 3 comments · Fixed by #3409
Labels
bug Something is wrong :( small
Milestone

Comments

@kinow
Copy link
Member

kinow commented Apr 9, 2019

Hi,

I executed cylc --debug --verbose --no-detach five, without registering the suite five. And I was expecting cylc to fail and nothing to be touched on my file system. However, looks like the ~/cylc-run/five (or wherever is cylc run/work directories specified) was still created, but empty.

This is a bit misleading. I noticed this happened after I moved my cylc run/work directories to /tmp, ran my suite five, minimized the terminal. Then from another terminal went to check the logs, and the directory was empty.

Took me a few seconds to understand why that happened. The issue happens with 7.8.x line too, and that's because before checking if the suite exists, we try to create auth files (create_auth_files call). I think this logic should be changed, and instead the auth files should be created only if the suite exists.

https://github.com/cylc/cylc/blob/d2e649bfcdaf655a0ae56bf128f213a57e4e612c/lib/cylc/scheduler_cli.py#L94-L104

Cheers
Bruno

@kinow kinow changed the title Avoid creating empty suite directories whe running suites that do not exist Avoid creating empty suite directories when running suites that do not exist Apr 9, 2019
@kinow kinow added the bug Something is wrong :( label Apr 9, 2019
@kinow kinow added this to the cylc-8.0a1 milestone Apr 9, 2019
@kinow
Copy link
Member Author

kinow commented Apr 9, 2019

Not sure if we need to worry about 7.8.x for this small one. Probably?

@kinow kinow added the small label Apr 9, 2019
@hjoliver
Copy link
Member

I can't look at the code right now, but this might be complicated slightly by auto-registration of a suite in $PWD by cylc run. (Should still be able to check if there is a suite in $PWD though, before creating auth files).

@hjoliver
Copy link
Member

Not sure if we need to worry about 7.8.x for this small one. Probably?

Yes, better do both branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :( small
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants