Skip to content

Commit

Permalink
flat-manager-client: check for all missing objects
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abderrahim authored and barthalion committed Jul 11, 2024
1 parent 13841c5 commit aab9e75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flat-manager-client
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit aab9e75

Please sign in to comment.