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 --argument-file option to dfx canister sign #2787
Conversation
Dear @Maximkaaa, 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
|
Dear @Maximkaaa, 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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for such a complete PR! Even changes to the docs are included!
I have a few small suggestions for the tests, otherwise this looks great.
Co-authored-by: Severin Siffert <severin.siffert@dfinity.org>
Thanks for the quick review and suggestions. Yes, I also wanted to check the sign result in the tests but was not sure how to go about it. |
I'm not 100% sure this works either, but I think it should. Would you mind going through the CLA bot process? Otherwise I'm not allowed to merge this. (Also, can you do it for both issues? It has a bug where it duplicates everything and if you just go through it for both issues it opened it's quickest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should fix the sign_send test failures
Co-authored-by: Severin Siffert <severin.siffert@dfinity.org>
@sesi200 I applied the suggested change and completed cla process in both issues. |
Thanks a lot, @Maximkaaa. I'll only have to get #2788 merged, and then this is good to merge, too |
Co-authored-by: Severin Siffert <severin.siffert@dfinity.org>
Co-authored-by: Severin Siffert <severin.siffert@dfinity.org>
I've fixed the last e2e test. The difference between expected and actual was due to the ordering of fields in the json, actual message is same. |
👍 then all that is left is to merge master |
Co-authored-by: Eric Swanson <64809312+ericswanson-dfinity@users.noreply.github.com>
It seems that the order of fields in the response is not fixed so the tests flicker. So I changed the approach to checking the signed values. Instead of sending and checking the response, why not just check the arguments in the signed message file? |
That works as well. Thanks! |
Description
dfx canister call
command has an argument--argument-file
to allow sending the request when argument string is too long for shell.dfx canister sign
command didn't have this argument so some of the requests possible bydfx canister call
were not possible to be executed through sign/send workflow. This PR fixes this unfortunate inconvenience:--argument-file
option tosign
commandcall
command to utils so that it can be reused by bothcall
andsign
expect
sHow Has This Been Tested?
Added e2e test cases. Also did signing manually with compiled
dfx
, including some very long argument strings that didn't fit into CLI arguments.Checklist: