-
Notifications
You must be signed in to change notification settings - Fork 947
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
Add TerminateSuccessfully task to immediately end the execution in a Success state without processing any downstream tasks #5599
Comments
Hi @anna-geller, could you clarify the purpose of adding this feature? Will it provide a specific functionality, or is it intended just for demonstration purposes? |
One user asked about it for a more elaborate conditional logic so we opened the issue In case you consider contributing, keep in mind this will need to touch some code on the Executor side to be aware of this new task that can set Execution state to a Success |
Hello @anna-geller, |
Hi @Smiloutcha, It might be better if you'd look through other issues from the curated list of good first ones and check if there is any which you can solve independently. That way, your help would be most aprreciated. 🚀 |
Hello @MilosPaunovic, |
@Smiloutcha I refined the issue body and I'm adding an example below that shows the use case for this new plugin: task3 and task4 should never run if the input is set to false id: conditional
namespace: company.team
inputs:
- id: run_if_true
type: BOOLEAN
defaults: true
tasks:
- id: conditional
type: io.kestra.plugin.core.flow.If
condition: "{{ inputs.run_if_true }}"
then:
- id: task1
type: io.kestra.plugin.core.log.Log
message: Hello
- id: task2
type: io.kestra.plugin.core.log.Log
message: Hello
else:
- id: exit_0
type: io.kestra.plugin.core.execution.TerminateSuccessfully
- id: task3
type: io.kestra.plugin.core.log.Log
message: This should not run if "{{ inputs.run_if_true }}" is false
- id: task4
type: io.kestra.plugin.core.log.Log
message: This should not run if "{{ inputs.run_if_true }}" is false |
@anna-geller Thank you! This explanation makes things much clearer. I just need some help with the configuration, as I’m still unable to debug on Kestra. If possible, I’d love to get started on the issue. |
the contributor instructions on how to build kestra locally are here https://kestra.io/docs/getting-started/contributing#build-kestra-locally |
@anna-geller Thank you! I’ll work on the configuration and get started on it as soon as possible. |
The main goal of this task would be to introduce a behavior similar to Python's
sys.exit(0)
or linuxexit 0
.The text was updated successfully, but these errors were encountered: