-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add AssetManager #603
Conversation
Dear @sea-snake, In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA1. If you decide to agree with it, please visit this issue and read the instructions there. — The DFINITY Foundation Footnotes
|
PR is work in progress. Main points that are still TODO:
|
Update to latest
Revert browser e2e changes
Revert browser e2e changes
Update @dfinity/assets e2e test and README.md
Example application PR: dfinity/examples#355 |
This is close to ready, and the main logic looks solid! To manually run the lint checks, you can run |
…d null check to isReadable.
Thanks for the helpful feedback! I've resolved these points in the latest commit. |
…de.js file read/write to/from asset canister test.
@sea-snake Seems there is still an issue with the timeout for the E2E tests. |
Ended up reducing the asset size in the tests (e.g. from 1MB to 1KB) to decrease the test duration. On a local environment, the processing speed is more in line with expectation (2s) for each chunk but it seems things take a bit longer on the automated test env. |
Thanks @sea-snake! |
@sea-snake is it concerning that the tests were timing out with a minute to run for a 3mb upload? |
@krpeacock
|
@krpeacock |
I'll go ahead and merge so we can get this work in front of people, and I'll create an issue to follow up on automating some benchmarks |
Doing some more debugging now to see if there are some other issues slowing things down. |
Description
Currently there's the AssetManager implementation available here.
This PR improves on this implementation and moves it to @dfinity/assets.
The AssetManager has list, store, delete, get, batch and clear methods to manage assets in an asset storage canister.
Fixes #602
How Has This Been Tested?
AssetManager
has e2e tests (Node.js)Readable
has unit testsChecklist: