-
Notifications
You must be signed in to change notification settings - Fork 55
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
allow users to add workflow states after a built-in executing action #3014
Comments
The original proposal is to have the built-in actions honoring the [scheduled]
action = "builtin"
on_success = "executing"
[executing]
action = "builtin"
on_success = "postprocess"
on_error = "rollback" However, to be more consistent with the other actions - notably background scripts, [scheduled]
action = "builtin"
on_exec = "executing"
[executing]
action = "builtin"
on_success = "postprocess"
on_error = "rollback" I also propose to deprecate the confusing [scheduled]
action = "software_update"
on_exec = "executing"
[executing]
action = "await_software_update"
on_success = "postprocess"
on_error = "rollback" Then, as a syntactic sugar, it will be convenient to squash the trigger and the await actions. As in: [scheduled]
action = "software_update"
on_exec = "executing"
on_success = "postprocess"
on_error = "rollback" |
DesignThree points have to be addressed:
|
After discussion with @reubenmiller , we agreed on another more consistent approach to deprecate the confusing The key idea is to see the issue as a namespace issue: So the proposal is to distinguish Triggering the builtin behavior will then be done using the [scheduled]
operation = "builtin:software_update"
on_exec = "executing"
[executing]
action = "await-operation-completion"
on_success = "postprocess"
on_error = "rollback" Triggering the builtin version of an operation is done following the same rules as for sub operations:
For backward compatibility, any |
The last proposal definitely covers the stated requirement of adding post-processing states after a built-in operation execution. But we should also consider a future enhancement where users would want to override the
In most cases, the users would want to reuse all those steps but sometimes add an additional state in between step 2 and step 3 to do some validation on the downloaded artefact before it is applied. In such cases, instead of a all-in-one The current proposal doesn't prevent the possibility to add more actions like that in the future, which is why I like this over the previous one tying actions to their corresponding states. My only concern with this proposal is the decision to overload the same |
I see a difference between steps like
|
Review of the Test Suite and Documentation done, tested also for flakiness, working as expected. |
Is your feature improvement request related to a problem? Please describe.
When overriding the
config_update
workflow which re-uses the existing thin-edge.ioconfig_update
functionality and only adds a pre and post state. Thepostprocess
state is not currently not possible to add as the built-inexecuting
state transitions automatically tosuccessful
ignoring whateveron_success
is defined.An example workflow is show below, where
preprocess
andpostprocess
have been added to perform some custom actions before letting thetedge-agent
execute the built-in functionality.Below shows the workflow log after an execution, notice how the
postprocess
state is not present in the log (but thepreprocess
state is).Describe the solution you'd like
Built-in actions should honour the
on_success
fields defined in a given workflow.Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: