feat: allow upload/retrieve of assets of arbitrary size from asset canister#1482
Merged
mergify[bot] merged 52 commits intomasterfrom Mar 12, 2021
Merged
Conversation
added 30 commits
March 8, 2021 14:09
create_batch, create_chunk, create_asset, set_asset_content, get, get_chunk work manually
added 4 commits
March 8, 2021 14:09
Use serde_bytes for [u8] Co-authored-by: Yan Chen <48968912+chenyan-dfinity@users.noreply.github.com>
Contributor
|
Thanks for walking me through these change yesterday! in general it lgtm. I am taking a pass through the .rs sections... |
p-shahi
reviewed
Mar 10, 2021
p-shahi
approved these changes
Mar 10, 2021
Contributor
p-shahi
left a comment
There was a problem hiding this comment.
may want review from others as well
added 3 commits
March 10, 2021 15:53
…et-canister-large-assets
mergify bot
pushed a commit
that referenced
this pull request
Mar 11, 2021
…#1483) And add support for http requests in the base storage canister (with a default to `/index.html`). This does not support other encodings than `identity` for now (and doesn't even return any headers). This support will be added to the upgraded asset storage canister built in #1482. Added a test that uses `curl localhost` to test that the asset storage AND the webserver properly support the http requests. This commit also upgrades tokio and reqwest in order to work correctly. There are also _some_ performance issues noted (this is slower than the `icx-http-server` for some reason), but those are not considered criticals and could be improved later on. Renamed the `project_name` in our own generated assets to `canister_name`, for things that are generated during canister build (and not project generation). Ref https://github.com/dfinity/dx-triage/issues/96
added 2 commits
March 11, 2021 10:53
p-shahi
reviewed
Mar 11, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per the design doc:
Adds asset canister methods:
Reworks the asset installer in
dfxto use these methods. It can therefore upload assets that exceed the message ingress size. Separate work (which this PR enables) will have to updateagent-jsto download these large assets.Other than allowing the storage and retrieval of large assets, this PR does not address:
dfxalways uploads withcontent-type: application/octet-streamandcontent-encoding: identitydfxalways uploads all assets (even those that have not changed), and still does not delete assets that were previously uploaded but no longer exist.store(),retrieve(), andlist()method signatures are unchanged for the time being, for backward compatibility. Later work will remove theretrieve()method, change the semantics and parameters ofstore(), and change the parameters and return type oflist().