Skip to content

Determine when CreateBundleFromRefList would generate an empty bundle

James Fargher requested to merge check_empty_bundle into master

gitlab#35862 (closed)

In order to gracefully handle incremental backups where nothing has changed, we need to determine when git bundle create failed because the bundle was empty. This isn't an error for incremental backups, it simply means there were no updates.

The FailedPrecondition GRPC code was chosen here since it best matches the litmus test:

(c) Use FailedPrecondition if the client should not retry until the system state has been explicitly fixed. E.g., if an "rmdir" fails because the directory is non-empty, FailedPrecondition should be returned since the client should not retry unless they have first fixed up the directory by deleting files from it.

Edited by James Fargher

Merge request reports

Loading