Closed moadqassem closed 4 months ago
LGTM label has been added.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: xrstf
The full list of commands accepted by this bot can be found here.
The pull request process is described here
What this PR does / why we need it: In Tinkerbell a workflow brings together Hardware and a Template for execution.. The status field of the workflow can be used to determine the current state of the workflow and to identify any issues that may have occurred during the execution of it. Thus, it is important to keep track of those workflows even if they were executed to keep track of the provisioning processes. This PR makes the workflows of a hardware unique and it opens up the possibility to run a workflow multiple times and treat them as an idempotent process which can't be resumed in terms of failures. Those workflows must be deleted in two situations:
1- The workflow has a pending state however the machine deployment has been deleted. Thus we should get rid of those workflows to prevent triggering them in the future. 2- The workflow is stuck in a timeout state and it cannot be resumed thus they don't have any real value.
This PR cleans up those workflows based on the criteria above.
Which issue(s) this PR fixes:
Fixes #
What type of PR is this? /kind feature
Special notes for your reviewer:
Does this PR introduce a user-facing change? Then add your Release Note here:
Documentation: