Skip to content

gitaly: Adapt to structured errors returned by UserSquash

Patrick Steinhardt requested to merge pks-user-squash-structured-errors into master

What does this MR do and why?

The UserSquash RPC currently doesn't return an error in all error cases. Most importantly, it will return successfully in case either resolving the start or end reference have failed, when the rebase resulted in an error, or when the final merge failed. This makes us blind to those errors, and even more importantly it makes Praefect blind. As a consequence, Praefect is creating a lot more replication jobs than it needs to.

In the context of gitaly!4374 (merged) we thus want to convert UserSquash to return structured errors. This means that in all conditions where we previously didn't return an error, we will now instead return an error with embedded error details which tell the caller exactly why the RPC call has failed. The caller thus gets information about which revision couldn't be resolved and which files have been conflicting.

We need to adapt Rails first such that it knows to handle those new errors correctly. In gitaly!4381 (merged) we have already added the Protobuf definitions for those new structured errors.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Patrick Steinhardt

Merge request reports

Loading