keep icon indicating copy to clipboard operation
keep copied to clipboard

[🐛 Bug]: Workflow not deleted when we don't provision it anymore

Open tuantran0910 opened this issue 8 months ago • 7 comments

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.

tuantran0910 avatar Apr 22 '25 08:04 tuantran0910

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

dosubot[bot] avatar Apr 22 '25 08:04 dosubot[bot]

Can I work on it?

korolenkowork avatar Apr 22 '25 17:04 korolenkowork

Done

korolenkowork avatar Apr 22 '25 21:04 korolenkowork

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.

Image

tuantran0910 avatar Apr 23 '25 02:04 tuantran0910

Hi @tuantran0910, thanks for information, but I've already fix it in current opened PR

korolenkowork avatar Apr 23 '25 03:04 korolenkowork

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.

tuantran0910 avatar Apr 23 '25 04:04 tuantran0910

Ok, I see when I missed. I'll fix it little bit later today

korolenkowork avatar Apr 23 '25 04:04 korolenkowork