Skip to content

Fix conflict resolver to handle FailedPrecondition error correctly

Patrick Bajao requested to merge 281162-handle-conflicts-missing-side into master

What does this MR do?

Before this change, Gitlab::Git::Conflict::Resolver#conflicts is meant to rescue GRPC::FailedPrecondition exception and re-raise Gitlab::Git::Conflict::Resolver::ConflictSideMissing.

That wasn't working though as wrapped_gitaly_errors will rescue it as a GRPC::BadStatus exception because that's the parent of GRPC::FailedPrecondition.

That results to MR head diff not showing up when there are conflicts with missing side.

This fix moves the rescue inside the wrapped_gitaly_errors block so we can rescue appropriately.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Related to #281162 (closed)

Edited by Patrick Bajao

Merge request reports