Deleting a Patch
Delete a patch in the pending status
Section titled “Delete a patch in the pending status”ringctl patch delete <patch_id> -e <cellsdev|cellsprod>Delete a patch in the failed status
Section titled “Delete a patch in the failed status”A failed patch might have been partially applied, so we need to revert the patch along with deleting the failed patch.
To revert a failed patch, make the following changes in a single MR:
-
Delete the failed patch
Terminal window ringctl patch delete <patch_id> -e <cellsdev|cellsprod>This will create a branch on the remote and commit to it. Push the following changes to the same branch.
-
Introduce a new patch reverting the attribute(s) that were changed in the failed patch to its previous value. You can determine the previous value of the attribute(s) by looking at the commit that applied the patch to the ring (example).
Make sure you set the following attributes correctly:
-
Set the
ringkey in the new patch to the same ring where the previous patch failed. -
Set the
completed_after_ringkey in the new patch to the same value as theringkey, so that the new patch is only applied to the ring where the previous patch failed. -
Set a higher priority for the new patch, so that it is executed first, before any patches that are already in the queue. For example, if the first patch in the queue has a priority of 4, set the priority of the new patch to 3, so that it is placed at the front of the queue.
-
For an auto-deploy patch
Section titled “For an auto-deploy patch”For a patch that modifies only prerelease_version and has only_gitlab_upgrade: true, it is safe to just
delete the failed patch file if the next patch in the queue is also an auto-deploy patch. If not, you can follow
the above steps to revert the failed patch.