Skip to content

UI: Inaccurate status messages when uploading items with same digest

Context

When uploading files or directories with the same hash but different names, the status messages are not distinguishing between the different filenames.

For example:

> cd /tmp/identical-files
> echo "hello" > file1
> cp file1 file2
> bgd cas upload-dir /tmp/identical-files/
Starting for remote=[localhost:50051]
Queueing path=[/tmp/identical-files/file1]
Queueing path=[/tmp/identical-files/file2]
Queueing path=[/tmp/identical-files/]
Success: Pushed path=[/tmp/identical-files/file2] with digest=[5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03/6]
Success: Pushed path=[/tmp/identical-files/file2] with digest=[5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03/6]
Success: Pushed path=[/tmp/identical-files/] with digest=[8051c570d8186b40525b56e3dd2424503a4182e8b43c9ddcc41123fbefb28bb6/158]

In this example, according to the output, file2 seem to have been pushed twice, and file1 not pushed.

Task Description

Modify the current status-reporting function to take into consideration that a given digest might be pushed for different paths.

Acceptance Criteria

bgd upload-{file,directory} should show status messages that distinguish between different filenames, even if they share the same digest.