ActionView::Template::Error: Object not found - no match for id (a92b10aef6e9e387c27771a3f1313f00...
This looks like the case where the source or target commit of a merge request has been pruned. Here's how to reproduce:
- Create a new MR for a branch
- On that branch, run
git commit --amend, modify the message - Run
git push --force - On the local repo, run
git gc --prune=all - Visit the MR.
I think the right behavior would be to verify the existence of the commit IDs. If they are not present, display something like, "Source branch no longer exists."
-Stan
https://sentry.gitlap.com/gitlab/gitlabcom/issues/2671/
Rugged::OdbError: Object not found - no match for id (a92b10aef6e9e387c27771a3f1313f00e22dc0a7)
lib/gitlab/metrics/instrumentation.rb:138:in `lookup'
retval = #{send_signature}
app/models/repository.rb:719:in `can_be_merged?'
their_commit = rugged.lookup(source_sha)
app/models/merge_request.rb:266:in `check_if_can_be_merged'
!broken? && project.repository.can_be_merged?(source_sha, target_branch)
app/models/merge_request.rb:296:in `mergeable?'
check_if_can_be_merged
app/views/projects/merge_requests/_show.html.haml:43:in `_app_views_projects_merge_requests__show_html_haml___572837206264452657_70196590519620'
- if @merge_request.source_branch_exists? && @merge_request.mergeable? && @merge_request.can_be_merged_by?(current_user)
...
(149 additional frame(s) were not displayed)
ActionView::Template::Error: Object not found - no match for id (a92b10aef6e9e387c27771a3f1313f00e22dc0a7)
lib/gitlab/metrics/instrumentation.rb:138:in `lookup'
retval = #{send_signature}
app/models/repository.rb:719:in `can_be_merged?'
their_commit = rugged.lookup(source_sha)
app/models/merge_request.rb:266:in `check_if_can_be_merged'
!broken? && project.repository.can_be_merged?(source_sha, target_branch)
app/models/merge_request.rb:296:in `mergeable?'
check_if_can_be_merged
app/views/projects/merge_requests/_show.html.haml:43:in `_app_views_projects_merge_requests__show_html_haml___572837206264452657_70196590519620'
- if @merge_request.source_branch_exists? && @merge_request.mergeable? && @merge_request.can_be_merged_by?(current_user)
...
(149 additional frame(s) were not displayed)