Skip to content

Fix 500 error when visiting a commit where the blobs do not exist (nil blobs)

Eric Eastwood requested to merge 41491-fix-nil-blob-name-error into master

What does this MR do?

EE MR: https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3987

Fix 500 error when visiting a commit where the blobs do not exist (nil blobs)

Are there points in the code the reviewer needs to double check?

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/16193 resolved the issues with a nil blob not playing nice with the safe navigation operator new_blob&.external_storage_error? ----> undefined method 'external_storage_error?' for nil:NilClass. See discussion https://gitlab.slack.com/archives/C02PF508L/p1515032270000250

Reproduction steps

  1. Import https://gitlab.com/scmaps.net/starcraft_brood_war_maps_archive.git a new project by git URL (this may take a while)
  2. Visit http://localhost:3000/root/starcraft_brood_war_maps_archive/commit/6160b40e36a1db4760c185c369fceeb323dbf077A
  3. Notice how __#__/(8)ber Paintball.scx doesn't have a name available in the "1000 changed files" dropdown (easiest to search in dev tools to scroll into view)

Why was this MR needed?

scmaps.net/starcraft_brood_war_maps_archive@6160b40e throws a 500 because the old_blob and new_blob do not exist(not sure how to recreate this in the real-world).

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #41491 (closed)

Edited by Eric Eastwood

Merge request reports