-
Notifications
You must be signed in to change notification settings - Fork 94
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
scan: exclude Cylc 7 workflows from scan results #4771
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, in my testing this merely makes a Cylc7 workflow that used to show up as myflow
show up as myflow/log/suite
now, when running cylc scan --state=all
e2089a6
to
352175a
Compare
The Needed to change
|
@@ -206,13 +233,14 @@ def _scan_subdirs(listing: List[Path], depth: int) -> None: | |||
for task in done: | |||
path, depth, contents = task.result() | |||
running.remove(task) | |||
if dir_is_flow(contents): | |||
is_flow = dir_is_flow(contents) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth repeating the type annotation here so that nobody removes the is_flow is False
check below in an effort to tidy
is_flow = dir_is_flow(contents) | |
is_flow: Optional[bool] = dir_is_flow(contents) |
4e9a091
to
675142d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked out and tested.
I initially had a problem with this (a consequence of not tidying my run directories 🤦 ), I had a log directory from a previous run in the directory above my run dir which prevented it from showing. I suspect scan is going to need to be thought of when doing #4477, as this will (I think) potentially legitimize this scenario.
An unintended side-effect of #4506 is that
cylc scan
is no longer able to tell between A Cylc 7 workflow that is running under Cylc 8 in compatibility mode and one that is running under Cylc 7.This PR uses the
log/workflow
directory as a marker to exclude Cylc 7 workflows from scan results.Note this fix also impacts the UIS which currently displays Cylc 7 workflows.
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.cfg
andconda-environment.yml
.