Open amol-anand opened 3 years ago
Thanks for raising the issue, @amol-anand ! This looks like a default limit of the underlying storage, but ideally the SDK should handle the operation in the most appropriate manner.
cc @purplecabbage @sandeep-paliwal @moritzraho for feedback
JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-946
After some investigation I can conclude that there are two issues here:
list
is internally used by delete
and copy
which explains the bug with delete
. We need to support storage with more than 5000 files, we should expose some sort of pagination and need to fix the returned number of files in list
based on the memory constraints in runtime actions. files.delete('/')
should still delete all files but internally list with pagination once we support this. Some changes to handle > 5000 files will be required by files.copy
too.
Expected Behaviour
await files.delete('/') should delete all files
Actual Behaviour
files.delete('/') only deletes 5000 files
Reproduce Scenario (including but not limited to)
Run await files.delete('/') on an account that has more than 5000 files. Run files.list('/') before and after the delete command to see how many files were deleted.
Steps to Reproduce
Platform and Version
aio-lib-files version 1.3.1
Sample Code that illustrates the problem
Logs taken while reproducing problem
No useful logging.
"response": { "result": { "error": "The action did not produce a valid response and exited unexpectedly." }, "status": "action developer error", "success": false }