PendingRestore::hasNoDbDumpsDirectory checks for any type of files
PendingRestore::getAvailableDbDumps checks for dumps only
There are few ways to solve the issue. This PR uses PendingRestore::getAvailableDbDumps to check existence of dumps; another way - add the same file extension filter to PendingRestore::hasNoDbDumpsDirectory. I prefer the current approach to make codebase smaller and do not repeat the logic. But I'm ok to fix PendingRestore::hasNoDbDumpsDirectory if you think it's better.
BTW, it was the only usage of PendingRestore::hasNoDbDumpsDirectory. I haven't removed this method because it was public and not marked as @internal (which means it will be BC break).
PS: I discovered this issue debugging my CI check (probably caused by the DB connection misconfiguration), the message was really confusing:
"dumps" is plural because it should be plural for zero :)
PPS: How about listing all extracted files in the NoDatabaseDumpsFound message? This will improve debugging experience a lot. I can create a PR.
PendingRestore::hasNoDbDumpsDirectory
checks for any type of filesPendingRestore::getAvailableDbDumps
checks for dumps onlyThere are few ways to solve the issue. This PR uses
PendingRestore::getAvailableDbDumps
to check existence of dumps; another way - add the same file extension filter toPendingRestore::hasNoDbDumpsDirectory
. I prefer the current approach to make codebase smaller and do not repeat the logic. But I'm ok to fixPendingRestore::hasNoDbDumpsDirectory
if you think it's better.BTW, it was the only usage of
PendingRestore::hasNoDbDumpsDirectory
. I haven't removed this method because it was public and not marked as@internal
(which means it will be BC break).PS: I discovered this issue debugging my CI check (probably caused by the DB connection misconfiguration), the message was really confusing:
"dumps" is plural because it should be plural for zero :)
PPS: How about listing all extracted files in the
NoDatabaseDumpsFound
message? This will improve debugging experience a lot. I can create a PR.