Closed paulyoung closed 1 year ago
Confirming that this works using dfx
:
$ dfx canister call codebase_backend getCanisterMetrics '(record { dateFromMillis = 0; dateToMillis = 0; granularity = variant { daily }; })'
(opt record { data = variant { daily = vec {} } })
This looks strange. Not sure where the out-of-bound error come from...Can you try not using ${env_var}
, but just hard code the content? I suspect the error comes from some other crates that use unsafe? Would be nice to have a smaller repo.
I've been trying to debug the following error:
I had started at the beginning of the file because the error mentioned "import" but it seems to be just printing the truncated contents of the file.
After much investigating I've narrowed it down to these lines of my test which happen to be the last thing in the file.
If I comment out these lines then everything works fine.
Putting it all on one line like this makes no difference:
let _ = call codebase.getCanisterMetrics(record { dateFromMillis = 0; dateToMillis = 0; granularity = variant { daily } });
Neither does reducing the file to this:
Other methods work fine:
Placing something else at the end of the file made no difference either.