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
If provisioning has a failure on one of the steps we write to the error field in the state index. However when we deprovision that same workflow we don't remove the error message from the document in the workflow state index.
How can one reproduce the bug?
Provision with an expected failure (easy way is to provision a pipeline with a processor that isn't in your cluster)
2.Deprovision the same workflow:
We can either simply place the error field as an empty string, however this isn't prefered because if the error field wasn't there to begin with now we have the field with just "error": "".
You can't directly remove the field through update, this has to be done through a script as far as I know. You also can't provide both a contentMap(doc) and a script in the same update request. This means we either have to just update the logic here https://github.com/opensearch-project/flow-framework/blob/main/src/main/java/org/opensearch/flowframework/transport/DeprovisionWorkflowTransportAction.java#L230 to update with a script that removes the error field if it exists (e.g "if (ctx._source.contains(error)) { ctx._source.remove('error)}") and updates the other fields accordingly or we have to make two update operations, one with the current way we do it with a new doc and another with the painless script
The text was updated successfully, but these errors were encountered:
Seriously, though, this is very interesting. I'm not overly concerned a provisioning error hangs around after deprovisioning the failure (although should we re-populate it with deprovisioning failures, that I don't think we do?). More importantly if I provision a second time does the error remain even if provisioning was successful?
What is the bug?
If provisioning has a failure on one of the steps we write to the error field in the state index. However when we deprovision that same workflow we don't remove the error message from the document in the workflow state index.
How can one reproduce the bug?
2.Deprovision the same workflow:
resulting state index:
What is the expected behavior?
error field shouldn't be there anymore
Potential solution
Some potential solution
"error": ""
."if (ctx._source.contains(error)) { ctx._source.remove('error)}"
) and updates the other fields accordingly or we have to make two update operations, one with the current way we do it with a new doc and another with the painless scriptThe text was updated successfully, but these errors were encountered: