-
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
Implement named flows, and improve task logging. #4287
Conversation
c74819f
to
aa4a7ea
Compare
@hjoliver What is the status of this PR? Would you like me to:
|
Thanks for asking @wxtim . It's blocked for a short while pending an off-side meeting with @dpmatthews and @oliver-sanders on several spawn-on-demand topics (scheduled for Wednesday). I should have converted to draft ..will do that now. |
This makes a lot of sense, nice.
👍 To stop a flow ... This removes the warm1 flow label from all task proxies 🎉 |
Outstanding questions:
|
Discussed in meeting:
|
I think we may want to accumulate a bit of metadata around [re]flows so happy with a short auto-generated integer rather than a timestamp (nicer for logging and the CLI). Some metadata we could add in due course:
Looking ahead we will likely want to merge the
# current proposal / reference implementation
~user/workflow//cycle/task/job
~user/workflow:status//cycle:status/task:status/job:status # with all selectors
# possible extension for [re]flow
~user/workflow^flow//
# example
cylc stop myflow^orig |
Closing as superseded by #4300 |
This has been discussed, but we don't seem to have an issue up.
Motivation: while investigating "pre-initial dependency ignore" for individual flows (viewed as essential by @dpmatthews) I realized several problems with the current automatic flow-label management ... which makes user-named flows more than just a nice-to-have. Currently we use a set pool of ascii characters for flow names: users don't have to do anything, just use the given names, and merged flows can be labeled by simply concatenating characters rather than dealing with sets of multiple separate names. BUT it turns out:
you can't automatically prune flows that (seem to have) taken over the whole graph, because they might not have taken over, in which case pruning them can result in "conditional reflow" problems[UPDATE I'm no longer sure this is true, but see next point anyway]named flows
To trigger a new flow you have to give it a name:
Otherwise, it's a one-off trigger (no reflow):
The original flow is called
original
. Merged flows are represented by the set of constituent flow names. E.g. if awarm1
task catches up with itsoriginal
counterpart, the resulting merged task will be labelled withflows = {"original", "warm1"}
and downstream spawning is considered to belong to both flows (for conditional reflow prevention, for example).To stop a flow:
This removes the
warm1
flow label from all task proxies. A task with no flow labels won't spawn children, which stops the flow. (Flows can also just peter out, e.g. if they affect only a sub-graph off the side of the main graph).Flow labels are task proxy attributes (also in the datastore). At the moment, to see them you have to use
cylc dump --flows
or watch the scheduler log.logging changes
This sort of change always results in a lot of log-following to analyse why functional tests broke. This time the annoyingness of the current logging mess got the better of me so I made some improvements. All task state (and state attribute) changes are now logged automatically (via the state reset method) and consistently, e.g.:
Flows are ignored in logging if
original
is the only one (above). Otherwise:Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.py
andconda-environment.yml
. (None)