Skip to content
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

A developer can pass data as part of an installation #477

Closed
ghost opened this issue Mar 20, 2020 · 8 comments
Closed

A developer can pass data as part of an installation #477

ghost opened this issue Mar 20, 2020 · 8 comments

Comments

@ghost
Copy link

ghost commented Mar 20, 2020

The public spec supports an arg argument of type Blob during an install request. We need to support this in the CLI as well.

@ghost ghost added the enhancement label Mar 20, 2020
@nomeata
Copy link
Contributor

nomeata commented Mar 20, 2020

Although need is a strong word. For now, Motoko doesn’t use this feature of the system, so one could argue that dfx doesn’t have to support it either yet. Definitely not pressing.

@luc-mercier
Copy link

Since dfx supports custom canisters, not just motoko, this is actually required.

@nomeata
Copy link
Contributor

nomeata commented Sep 15, 2020

Agreed. The same feature was requestd for hfx a few days ago (https://github.com/dfinity-lab/dfinity/pull/5452), so there is demand now :-)

@crusso
Copy link
Contributor

crusso commented Sep 15, 2020

An external user (Norton Wang) also requested it here:

https://forum.dfinity.org/t/canister-installation-arguments/1254

@luc-mercier
Copy link

Agreed. The same feature was requestd for hfx a few days ago (dfinity-lab/dfinity#5452), so there is demand now :-)

I wonder whether the 2 requests were somehow linked :)

@nomeata
Copy link
Contributor

nomeata commented Sep 15, 2020

I wonder whether the 2 requests were somehow linked :)

No way!

@chenyan-dfinity
Copy link
Collaborator

#1038 works for single canister install.

I want to discuss how to extend this to install --all and deploy. I can think of two options but none are perfect:

  • Ignore canisters that requires install arguments in install --all and deploy
  • Have a field in dfx.json to specify the arguments

With this feature, we are starting to have one-to-many mapping from wasm module to canisters, e.g., I can create several counter canisters with different initial values:

dfx canister install counter '(0)'
dfx canister install counter '(1)'
dfx canister install counter '(2)'

And I should get three canister ids associated with the counter module. How does dfx manage this mapping?

For my PR, I will just handle the single canister install with only one canister id case, and let the team decide how to support the more general case. WDYT?

mergify bot pushed a commit that referenced this issue Sep 21, 2020
This PR only supports install arguments for a single canister with one canister id. The remaining cases are discussed in #477
dfinity-bot added a commit that referenced this issue Nov 10, 2020
## Changelog for advisory-db:
Branch: master
Commits: [rustsec/advisory-db@202265fb...0bdef412](rustsec/advisory-db@202265f...0bdef41)

* [`5eb66747`](rustsec/advisory-db@5eb6674) Unexpected panic in multihash `from_slice` parsing code ([RustSec/advisory-db⁠#475](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/475))
* [`0ca360b1`](rustsec/advisory-db@0ca360b) Assigned RUSTSEC-2020-0068 to multihash ([RustSec/advisory-db⁠#476](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/476))
* [`0bdef412`](rustsec/advisory-db@0bdef41) RUSTSEC-2020-0068: remove parameters from affected functions ([RustSec/advisory-db⁠#477](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/477))
mergify bot pushed a commit that referenced this issue Nov 10, 2020
## Changelog for advisory-db:
Branch: master
Commits: [rustsec/advisory-db@202265fb...0bdef412](rustsec/advisory-db@202265f...0bdef41)

* [`5eb66747`](rustsec/advisory-db@5eb6674) Unexpected panic in multihash `from_slice` parsing code ([RustSec/advisory-db⁠#475](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/475))
* [`0ca360b1`](rustsec/advisory-db@0ca360b) Assigned RUSTSEC-2020-0068 to multihash ([RustSec/advisory-db⁠#476](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/476))
* [`0bdef412`](rustsec/advisory-db@0bdef41) RUSTSEC-2020-0068: remove parameters from affected functions ([RustSec/advisory-db⁠#477](http://r.duckduckgo.com/l/?uddg=https://github.com/RustSec/advisory-db/issues/477))
@p-shahi
Copy link
Contributor

p-shahi commented Jun 7, 2021

part of this is done but the second half should be addressed with #1692

@p-shahi p-shahi closed this as completed Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants