-
Notifications
You must be signed in to change notification settings - Fork 60
Apply interruptible override from workflow execution config #minor #429
Apply interruptible override from workflow execution config #minor #429
Conversation
Allows for override of interruptible flag for a single execution, NodeDefaults still apply if not set in config Fixed minor typos in NodeSpec/nodeExecMetadata Signed-off-by: Nick Müller <[email protected]>
Signed-off-by: Nick Müller <[email protected]>
Thank you for opening this pull request! 🙌 These tips will help get your PR across the finish line:
|
Allows for workflow interruptible flag to be overwritten to false as well (task settings still take preference) Signed-off-by: Nick Müller <[email protected]>
Whilst a workflow can now have its interruptible setting overwritten to |
@MorpheusXAUT thank you for your contribution! @hamersaw, mind taking a look at this? |
…ptible Signed-off-by: Nick Müller <[email protected]>
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.
If I understand correctly, the workflow interruptible flag only applies as a default in the case that interruptible is not explicitly set on the node. Looks like this functionality is quite old. I don't think this is necessarily intuitive in some cases. For example, if the workflow interruptible is set to false some nodes may still be set as interruptible.
Not saying this is a change we should make, but if we are further exposing this functionality (in the UI changes) perhaps it warrants a brief discussion. Have you thought about this? My first thought is it may make more sense to handle as follows:
workflow interruptible = true then all nodes are interruptible
workflow interruptible not set then use the interruptible set on nodes
workflow interruptible = false then all nodes are non-interruptible
I believe it would only require a simple change to this conditional.
@@ -143,7 +143,7 @@ type NodeSpec struct { | |||
ActiveDeadline *v1.Duration `json:"activeDeadline,omitempty"` | |||
// The value set to True means task is OK with getting interrupted | |||
// +optional | |||
Interruptibe *bool `json:"interruptible,omitempty"` | |||
Interruptible *bool `json:"interruptible,omitempty"` |
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.
Thank you!
That's correct - the interruptible flag on the node currently has the "last call" when it comes to picking a setting.
I did think about that and initially had the override "skip" the node settings just like you suggested, but actually chose to keep the current behavior after talking to our team about what their expectations would be. For that reason, I wouldn't force every node to run as interruptible when using the workflow override, although I agree that it might be a bit unintuitive to users in some case.
Yeah, that should do it, although we'd probably also need to change the signature of |
Reasonable and very interesting, I wrongly assumed your use-case was the opposite, setting the workflow interruptible to false where a node is set to true.
Agreed, I would much rather remain consistent.
Once the IDL PR is merged and go.mod updated I can approve this. Just a note for future updates. If there is a general want for overriding interruptible on all nodes rather than defaulting if unset we could explore updating the workflow field to something like an |
Signed-off-by: Nick Müller <[email protected]>
Congrats on merging your first pull request! 🎉 |
…lyteorg#429) * Workflows can now be marked as interruptible via execution config Allows for override of interruptible flag for a single execution, NodeDefaults still apply if not set in config Fixed minor typos in NodeSpec/nodeExecMetadata Signed-off-by: Nick Müller <[email protected]> * Updated golden files Signed-off-by: Nick Müller <[email protected]> * Interruptible override from execution config is now optional Allows for workflow interruptible flag to be overwritten to false as well (task settings still take preference) Signed-off-by: Nick Müller <[email protected]> * Use released flyteidl version Signed-off-by: Nick Müller <[email protected]>
TL;DR
Applies
interruptible
override from workflow execution spec to nodes, allowing for workflows to be flagged as interruptible for a single execution.Type
Are all requirements met?
Complete description
The
ExecutionConfig
of aFlyteWorkflow
now contains anInterruptible
flag, indicating a workflow should be marked as interruptible for a single execution. TheIsInterruptible
getter ofFlyteWorkflow
has been adapted to return either the newInterruptible
flag of theExecutionConfig
or the already existing one from theNodeDefaults
, maintaining backward compatibility. Furthermore, the existing defaults logic for interruptible tasks still applies - a task defined withinterruptible=False
will still remain non-schedulable for spot instances.Two minor "interruptible" typos in the
NodeSpec
andnodeExecMetadata
types have been fixed - changes are backward compatible since the json representation had already been spelled correctly.Tests have been added to verify correct application of interruptible "inheritance" for nodes, smoke testing has been performed manually for workflow/single task executions and relaunches together with the flyteadmin changes.
Tracking Issue
flyteorg/flyte#2284
Follow-up issue
NA