Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
S392603: git_move_bookmark: Stop swallowing important diagnostics
Summary: In S392603, live sync (specifically, `git_move_bookmark` in the `post-receive` git hook was failing for aosp/manifest. This was due to missing ACL, but the most prominent error from the logs was about a missing branch, which was a red herring. This is what the errors looked like: ``` 999-update-mononoke-bookmark: Hook called for ref: refs/heads/feature-mos-11-validation-2024-02-05, old rev: f36c12574f28301755e2be5a400cf47e5ac1de78, new rev: d11378002b04fcad5b66cd351673c3ccfc3ac3d2 Error: SourceControlService::repo_move_bookmark failed with request_error(RequestError) Caused by: RequestError: bookmark 'heads/feature-mos-11-validation-2024-02-05' does not exist ``` This created confusion and slowed down root cause identification for this SEV. Refactor the code to be more explicit about the existence check we are doing. This removes the incorrect assumption that any error from `create_bookmark` must be due to the origin bookmark being absent, which leads to swallowing the real error. Reviewed By: singhsrb Differential Revision: D53473235 fbshipit-source-id: e6382e593926a94bdc78364a97c58977a84dbc89
- Loading branch information