From aab9e754e8da2f06ae341f715407068a58da137c Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Wed, 10 Jul 2024 21:58:17 +0100 Subject: [PATCH] flat-manager-client: check for all missing objects Previously, the code assumed that if a metadata object is available on the server all file objects it points to are also available, which is a reasonable assumption in general. However, a misbehaving prune operation can leave a repository in such a state with missing file objects. This change allows the repository to recover by uploading such missing files if they are needed for the currently uploaded commits. --- flat-manager-client | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flat-manager-client b/flat-manager-client index 96c4834..3fa34de 100755 --- a/flat-manager-client +++ b/flat-manager-client @@ -719,7 +719,7 @@ async def push_command(session, args): print("Remote missing %d of those" % (len(missing_metadata_objects))) - file_objects = local_needed_files(local_repo, missing_metadata_objects) + file_objects = local_needed_files(local_repo, metadata_objects) print("Has %d file objects for those" % (len(file_objects))) missing_file_objects = await missing_objects(session, args.build_url, token, list(file_objects))