Skip to content

fix: canister call uses remote candid file#2262

Merged
mergify[bot] merged 9 commits intomasterfrom
SDK-506-dfx-canister-call-should-use-candid-file-for-remote-canisters
Jun 17, 2022
Merged

fix: canister call uses remote candid file#2262
mergify[bot] merged 9 commits intomasterfrom
SDK-506-dfx-canister-call-should-use-candid-file-for-remote-canisters

Conversation

@viviveevee
Copy link
Contributor

@viviveevee viviveevee commented Jun 14, 2022

Description

If dfx is not able to determine the canister type, it just gives up at trying to determine the candid file.

Fixes SDK-506

How Has This Been Tested?

Added this situation to an existing e2e test.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@viviveevee viviveevee changed the title chore: canister call uses remote candid file fix: canister call uses remote candid file Jun 14, 2022
@viviveevee viviveevee marked this pull request as ready for review June 14, 2022 11:00
@viviveevee viviveevee requested a review from a team as a code owner June 14, 2022 11:00
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Would you please add an e2e test that demonstrates the problem this PR fixes? The test should fail prior to this change and succeed after it.

Here is an e2e test that shows canister call making a call to a remote canister, using the remote canister's candid definition: https://github.com/dfinity/sdk/blob/master/e2e/tests-dfx/remote.bash#L57

Is it the case that this PR makes it so canister call works for remote canisters before dfx deploy?

@viviveevee
Copy link
Contributor Author

viviveevee commented Jun 15, 2022

I found a more basic cause for the problem: If dfx was not able to determine the canister type, it just gave up at trying to determine the candid file. e2e now checks that it also works in that case.

Changes to get_local_cid_and_candid_path are reverted.

@viviveevee viviveevee requested a review from a user June 16, 2022 07:49
@ghost ghost added the automerge-squash label Jun 16, 2022
@mergify mergify bot merged commit 0cfe6f7 into master Jun 17, 2022
@mergify mergify bot deleted the SDK-506-dfx-canister-call-should-use-candid-file-for-remote-canisters branch June 17, 2022 01:56
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.

1 participant