mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
fix(git): serialize concurrent merges to the same parent branch
Two PMs completing different subtasks of the same parent could race on gh API merge calls. GitHub returns 409 to one but local DB write ordering wasn't guaranteed. Take row-level lock on parent task before merge; retry once on 409.
This commit is contained in:
@@ -224,6 +224,9 @@ async def test_pr_merge_returns_merge_commit_dict() -> None:
|
||||
project_id = uuid4()
|
||||
fake_task = MagicMock(
|
||||
project_id=project_id,
|
||||
# Root task — no parent to lock; concurrency tests cover the
|
||||
# parent-lock + retry-on-409 paths separately.
|
||||
parent_task_id=None,
|
||||
assigned_to=uuid4(),
|
||||
work_session_id=None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user