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

cylc stop doesn't work when reg ends with slash #4010

Closed
MetRonnie opened this issue Dec 22, 2020 · 4 comments · Fixed by #4011
Closed

cylc stop doesn't work when reg ends with slash #4010

MetRonnie opened this issue Dec 22, 2020 · 4 comments · Fixed by #4011
Assignees
Labels
bug Something is wrong :(
Milestone

Comments

@MetRonnie
Copy link
Member

MetRonnie commented Dec 22, 2020

TL;DR

When you do cylc run, if you have a slash at the end of the workflow name, e.g. cylc run foo/, then cylc stop foo won't work, only cylc stop foo/ will work. And vice versa.

Release version(s) and/or repository branch(es) affected?
Cylc 8.0a3.dev master

Steps to reproduce the bug

$ cylc run foo --hold
$ cylc stop foo/  # appears to work (no output as is the case of a success)
$ cylc get-suite-contact foo
CYLC_API=5
CYLC_SUITE_PROCESS=1234 /path/to/python3 /path/to/cylc run foo/ --hold
# etc

Expected behavior
Workflow stops and contact file removed.

Additional context
Often when I'm in the cylc-run dir, I use tab autocompletion to run workflows, stop them etc. But because the workflows are directories, that adds a / to the end of the reg (workflow name).

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 the bug Something is wrong :( label Dec 22, 2020
@MetRonnie MetRonnie added this to the cylc-8.0a3 milestone Dec 22, 2020
@MetRonnie MetRonnie self-assigned this Dec 22, 2020
@oliver-sanders
Copy link
Member

I'm unable to replicate this, did you give foo sufficient time to recieve the stop signal and shut down?

@oliver-sanders
Copy link
Member

oliver-sanders commented Dec 22, 2020

Confirmed by mixing use of trailing slash with cylc run and cylc stop:

$ cylc run --hold g1/

$ cylc run --hold g2

$ cylc stop g1; echo $?
0

$ cylc stop g2; echo $?
0

$ cylc cat-log g1
# ...
2020-12-22T13:48:07Z INFO - Final point: None
2020-12-22T13:48:07Z INFO - (foo.20191209T1200Z) spawned foo.20191210T0000Z flow(w)
2020-12-22T13:48:07Z INFO - (foot.20191209T1200Z) spawned foot.20191210T0000Z flow(w)
2020-12-22T13:48:07Z INFO - (fool.20191209T1200Z) spawned fool.20191210T0000Z flow(w)
2020-12-22T13:48:17Z INFO - [client-command] graphql osanders@vld601:cylc

$ cylc cat-log g2
# ...
2020-12-22T13:48:11Z INFO - Final point: None
2020-12-22T13:48:11Z INFO - (foo.20191209T1200Z) spawned foo.20191210T0000Z flow(y)
2020-12-22T13:48:11Z INFO - (foot.20191209T1200Z) spawned foot.20191210T0000Z flow(y)
2020-12-22T13:48:11Z INFO - (fool.20191209T1200Z) spawned fool.20191210T0000Z flow(y)
2020-12-22T13:48:23Z INFO - [client-command] graphql osanders@vld601:cylc
2020-12-22T13:48:23Z INFO - Command succeeded: stop(mode=StopMode.REQUEST_CLEAN)
2020-12-22T13:48:23Z INFO - Processing 1 queued command(s)
	+       stop(mode=StopMode.REQUEST_CLEAN)
2020-12-22T13:48:23Z INFO - Suite shutting down - REQUEST(CLEAN)
2020-12-22T13:48:23Z WARNING - Some partially satisfied prerequisites left over:
	foo.20191210T0000Z is waiting on:
	* foo_start.20191209T0900Z succeeded
	* cycle_end.20191209T1200Z succeeded
	foot.20191210T0000Z is waiting on:
	* foo_start.20191209T0900Z succeeded
	* cycle_end.20191209T1200Z succeeded
	fool.20191210T0000Z is waiting on:
	* foo_start.20191209T0900Z succeeded
	* cycle_end.20191209T1200Z succeeded
2020-12-22T13:48:24Z INFO - DONE

@oliver-sanders
Copy link
Member

Have checked, this does not effect Cylc7.

@oliver-sanders
Copy link
Member

oliver-sanders commented Dec 22, 2020

In the not too distant future the universal id will strip away trailing slashes from all input workflow IDs, however, it would still be good to know this can't resurface.

MetRonnie added a commit to MetRonnie/cylc-flow that referenced this issue Dec 22, 2020
@hjoliver hjoliver modified the milestones: cylc-8.0a3, cylc-8.0b0 Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :(
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants