Repository navigation
fix(gitlab): Make project webhook creation retry-safe - #129175
giovanni-guidini wants to merge 1 commit into
Conversation
f471665 to
f4a944d
Compare
f4a944d to
f30bde7
Compare
e22d792 to
e0d234c
Compare
e0d234c to
64988f4
Compare
Persist a reconciliation identity before creating project hooks so retries can list and adopt the original hook instead of creating duplicates. Paginate hook discovery and serialize reconciliation per repository.
64988f4 to
85778f9
Compare
Backend Test FailuresFailures on
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 85778f9. Configure here.
| hook_id, | ||
| reconciliation_id=new_reconciliation_id, | ||
| ) | ||
| outcome = "adopted" |
There was a problem hiding this comment.
Adopt 404 blocks hook replacement
Medium Severity
A 404 from the adopt update_project_webhook is not handled locally, so it falls through as a terminal not_found failure. That skips both a replacement create and a retry. The stored-id path treats a definite 404 as the signal that it is safe to create; after an ambiguous prior create the listed hook can disappear before the follow-up PUT, leaving the repository without a webhook until something else retriggers reconciliation.
Reviewed by Cursor Bugbot for commit 85778f9. Configure here.


GitLab project webhook reconciliation now persists an opaque creation identity before POST, paginates project hooks to adopt an exact prior attempt, and serializes work per repository. This makes the asynchronous ensure task safe after ambiguous create responses while retaining the existing rule that only a definite 404 permits replacement; verified duplicate cleanup and synchronous repository lifecycle reconciliation remain follow-up work.