Add support for expected_old_oid to avoid race conditions when deleting branches

What does this MR do and why?

The issue

By passing the expected old object ID, we ensure that the branch has not been updated by another client during the deletion process. This change enhances the reliability and consistency of branch deletion operations, mitigating potential data integrity issues caused by concurrent updates. Additionally, tests have been updated to verify the correct handling of this parameter and related error cases

Screenshots or screen recordings

The error message Before changes(500) Screenshot_2024-07-28_at_4.16.55_PM

After Screenshot_2024-07-28_at_3.30.02_PM

The workflow Screenshot_2024-07-30_at_12.51.41_AM

Edited by Emma Park

Merge request reports

Loading