Skip to content

chore: update ic-agent to latest master#1056

Merged
mergify[bot] merged 18 commits intomasterfrom
hansl/update-agent
Sep 28, 2020
Merged

chore: update ic-agent to latest master#1056
mergify[bot] merged 18 commits intomasterfrom
hansl/update-agent

Conversation

@hansl
Copy link
Contributor

@hansl hansl commented Sep 23, 2020

No description provided.

@hansl hansl requested a review from a user September 23, 2020 23:16
@hansl
Copy link
Contributor Author

hansl commented Sep 23, 2020

There is some exports from ic-agent that might be better to push up to the root module, but at least everything is accessible. The toughest part of the API is for some builder methods that doesn't take Option<X>, so we need to if { ... } outside. This should be fixed later by providing additional methods, really.

Nothing blocking this from going in and ic-agent to be published today.

ghost
ghost previously requested changes Sep 23, 2020
git = "ssh://git@github.com/dfinity-lab/agent-rust.git"
branch = "next"
rev = "9d611f08cb55923fc6ff5bf0136e8f4b848dd2cc"
rev = "ce7751e99d3d0ff76c66ad0796f7385afceeda17"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a drive-by comment: the rev doesn't quite work. Cargo will just fetch the latest from next branch if it decides to update ic-agent. I noticed this earlier when I bump Candid, ic-agent also gets updated to the latest even though rev is unchanged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rev is for hydra IIRC. Cargo ignores it when a branch is provided.

@ghost ghost dismissed their stale review September 28, 2020 15:56

comments no longer apply

Hans and others added 2 commits September 28, 2020 11:33
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
@mergify mergify bot merged commit 8a4b602 into master Sep 28, 2020
@mergify mergify bot deleted the hansl/update-agent branch September 28, 2020 20:03
mergify bot pushed a commit that referenced this pull request Sep 28, 2020
This adds the `dfx canister set-controller` subcommand
```
➜  hello git:(master) dfx canister set-controller --help
dfx-canister-set-controller
Sets the provided identity's name or its principal as the new controller of a canister on the Internet Computer network.

USAGE:
    dfx canister set-controller <canister> <new-controller>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <canister>          Specifies the canister name or the canister identifier for the canister to be controlled.
    <new-controller>    Specifies the identity name or the principal of the new controller.
```
An example use case:
```
➜  hello git:(master) dfx identity whoami
default
➜  hello git:(master) dfx identity list
default *
prithvi
➜  hello git:(master) dfx canister create hello
Creating canister "hello"...
"hello" canister created with canister id: "75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q"
➜  hello git:(master) dfx build hello
Building canisters...
➜  hello git:(master)
➜  hello git:(master) dfx canister set-controller hello prithvi
Set "prithvi" as controller of "hello".
➜  hello git:(master)
➜  hello git:(master) dfx canister install hello
Installing code for canister hello, with canister_id 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q
Replica error (code 5): IC0512: Only the controller of canister 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q can control it.
Expected controller: jxpuf-o4cfi-2zfqa-3svif-yxdiz-tuj3p-ctl6m-qsrfv-7zctw-z3bwc-2ae
Actual controller: 5gg4n-o6ooe-5zmlh-ac2kx-ntmkd-kamti-a3rqe-okecn-knil3-ord3t-mae
```
Note: Waiting for #1056 to get merged first (therefore, creating a PR against that branch)

- [x] push local e2e tests which is blocked because of #1057 (comment)
- [ ] update to a replica version which doesn't expose the expected controller's principal
- [x] update to agent-rs after this is merged dfinity/agent-rs#51
ghost pushed a commit that referenced this pull request Oct 6, 2020
This adds the `dfx canister set-controller` subcommand
```
➜  hello git:(master) dfx canister set-controller --help
dfx-canister-set-controller
Sets the provided identity's name or its principal as the new controller of a canister on the Internet Computer network.

USAGE:
    dfx canister set-controller <canister> <new-controller>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <canister>          Specifies the canister name or the canister identifier for the canister to be controlled.
    <new-controller>    Specifies the identity name or the principal of the new controller.
```
An example use case:
```
➜  hello git:(master) dfx identity whoami
default
➜  hello git:(master) dfx identity list
default *
prithvi
➜  hello git:(master) dfx canister create hello
Creating canister "hello"...
"hello" canister created with canister id: "75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q"
➜  hello git:(master) dfx build hello
Building canisters...
➜  hello git:(master)
➜  hello git:(master) dfx canister set-controller hello prithvi
Set "prithvi" as controller of "hello".
➜  hello git:(master)
➜  hello git:(master) dfx canister install hello
Installing code for canister hello, with canister_id 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q
Replica error (code 5): IC0512: Only the controller of canister 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q can control it.
Expected controller: jxpuf-o4cfi-2zfqa-3svif-yxdiz-tuj3p-ctl6m-qsrfv-7zctw-z3bwc-2ae
Actual controller: 5gg4n-o6ooe-5zmlh-ac2kx-ntmkd-kamti-a3rqe-okecn-knil3-ord3t-mae
```
Note: Waiting for #1056 to get merged first (therefore, creating a PR against that branch)

- [x] push local e2e tests which is blocked because of #1057 (comment)
- [ ] update to a replica version which doesn't expose the expected controller's principal
- [x] update to agent-rs after this is merged dfinity/agent-rs#51
dfinity-bot added a commit that referenced this pull request Sep 25, 2021
mergify bot pushed a commit that referenced this pull request Sep 25, 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

Successfully merging this pull request may close these issues.

2 participants