[🐛 Bug]: Workflow not deleted when we don't provision it anymore
Hi team,
I am provisioning a workflow via the environment, but when I stop provisioning it, the workflow continues to run normally instead of being deleted.
Additionally, I’ve noticed that if I repeatedly stop provisioning and restart the backend, the number of workflows increases significantly.
When a workflow is no longer provisioned, it should be deprovisioned based on specific conditions. The system checks if the workflow's provisioned file is None, does not exist, or is outside the provisioned_workflows_dir. If any of these conditions are met, the workflow should be deprovisioned [1].
If the workflow continues to run despite not being provisioned, ensure that the KEEP_WORKFLOWS_DIRECTORY environment variable is correctly set and that the application is restarted to trigger the deprovisioning process [2].
Regarding the increase in the number of workflows, this might be due to the system not correctly identifying and deprovisioning orphaned workflows. Ensure that the backend is properly configured to check for and remove orphaned workflows during restarts [1][3].
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Can I work on it?
Done
Hi @EnotShow, I have figured out the new bug in recent versions of Keep. Whenever the backend service restarts, the new duplicated workflow is provisioned one more time. Therefore, this will result tons of workflows.
Hi @tuantran0910, thanks for information, but I've already fix it in current opened PR
Hi @tuantran0910, thanks for information, but I've already fix it in current opened PR
Nice @EnotShow, some unit tests failed. You may need to have a look at them in order for the team to review and hopefully merge.
Ok, I see when I missed. I'll fix it little bit later today