hgitaly.branch: errors on filtered revision
Currently on foss.h.n, there is a much repeated error line in HGitaly logs:
[2024-03-08 08:23:38,721] [correlation_id=01HREJJ7X4JWPDEW54VG0KDFES] [2855501] [INFO] [hgitaly.service.interceptors] Starting to process RPC FindLocalBranchesRequest { repository { storage_name: "default" relative_path: "@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.git" gl_repository: "project-5" gl_project_path: "heptapod/heptapod" } sort_by: UPDATED_DESC }
[2024-03-08 08:23:38,777] [2855501] [ERROR] [hgitaly.branch] Unknown changeset ID in GitLab branches statefile for repo at b'/home/hg/repositories/@hashed/ef/2d/ef2d127de37b942baad06145e54b0c619a1f22327b2ebbcfbec78f5564afe39d.hg': FilteredRepoLookupError(b"filtered revision 'b5bac0c5a92e1fe2f376ef19e91c3e1b40eb3f6b'")
The corresponding repository is heptapod/heptapod> and the offending changeset is recorded as the head of branch/heptapod-0.24
(notice the incorrect branch naming, it is quite possible I pruned it):
$ grep b5bac0c5a92e1fe2f376ef19e91c3e1b40eb3f6b .hg/store/gitlab.branches
b5bac0c5a92e1fe2f376ef19e91c3e1b40eb3f6b branch/heptapod-0.24
Now two possibilities:
- this actually puts gRPC methods such as
FindLocalBranches
into error and that is a bug - the overall process resumed and this should only be logged at the
WARNING
level (found this will looking for occurrences of the "not implemented" log line).
In any case, no obsolete changeset should be in the GitLab states file, but that is not the responsibility of HGitaly.