graphite-project/carbonate

whisper-fill dst file doesn't exists

aruetten opened this issue · 4 comments

Hi,

I tried whisper-fill and it works mostly as a charm. But I have one issue with it.

It fails with a traceback if the dst file doesn’t exists.

From my point of view it's not that uncommon that at the new location not all whisper files are present after rearranging the destination.

Would it make sense for whisper-fill to simple put the src whisper file as it is at the destination if there is no file?

Yes, that is the expected behavior. This must have broken at some point and wasn't caught by the tests.

After reading your comment a second time, I may have misunderstood. The carbon-sync tool will copy the source file if the destination file isn't present, but whisper-fill expects a valid source and destination argument. Regardless, a traceback is an ugly user experience that needs to be caught and handled better.

@aruetten I'm updating the script to exit with an error message and exit 1 if either the source or destination arguments to whisper-fill are not files. This should be easier to follow. To add the behavior you want, I suggest something like this:

whisper-fill SRC DST || cp SRC DST

@jssjr

I'll try that. Thanks for your really quick response!