You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Opening this discussion to remind myself the linked issue to follow-up on, but any feedback/ideas are also welcome.
Script handler does not get passed certain workflow data such as cancellation type. Here is github #460 and the comment about possible improvement: #460 (comment)
Also, most of the current cmdline-arg passed could also be exported environment variables to reduce the length of the script invocation at the expense of having to set the env vars when testing the script out in isolation.
The idea is that the agent could export ADUC_WORKFLOW_ environment variables as part of the script invocation so they are available to the script, e.g. $ADUC_WORKFLOW_DEPLOYMENTTYPE would have value "retry" if the retry timestamp was updated by the cloud for the same deployment Id.
One could call workflow_utils.h functions already in a custom handler or when patching an existing handler such as workflow_get_cancellation_type(), but instead content handlers should not have to link with the workflow_utils static lib and depend on these leaking internals, which is something that needs improving overall. There should be a way to query workflow info without having to link to internal libraries, which implies maybe some kind of query api serviced by the AducIoTAgent process, or a different externally-consumable struct of curated workflow data fields of types defined in a 'device-update-devel' SDK library.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Opening this discussion to remind myself the linked issue to follow-up on, but any feedback/ideas are also welcome.
Script handler does not get passed certain workflow data such as cancellation type. Here is github
#460 and the comment about possible improvement:
#460 (comment)
Also, most of the current cmdline-arg passed could also be exported environment variables to reduce the length of the script invocation at the expense of having to set the env vars when testing the script out in isolation.
The idea is that the agent could export ADUC_WORKFLOW_ environment variables as part of the script invocation so they are available to the script, e.g. $ADUC_WORKFLOW_DEPLOYMENTTYPE would have value "retry" if the retry timestamp was updated by the cloud for the same deployment Id.
One could call workflow_utils.h functions already in a custom handler or when patching an existing handler such as
workflow_get_cancellation_type()
, but instead content handlers should not have to link with the workflow_utils static lib and depend on these leaking internals, which is something that needs improving overall. There should be a way to query workflow info without having to link to internal libraries, which implies maybe some kind of query api serviced by the AducIoTAgent process, or a different externally-consumable struct of curated workflow data fields of types defined in a 'device-update-devel' SDK library.//cc @Nox-MSFT
Beta Was this translation helpful? Give feedback.
All reactions