-
Notifications
You must be signed in to change notification settings - Fork 101
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
AWS invoke API ops giving java.lang.Character cannot be cast to java.lang.Number Error #71
Comments
I don't see this issue. What versions of |
All with newest version. Did your test exercise the uri-encode function? https://github.com/cognitect-labs/aws-api/blob/master/src/cognitect/aws/signers.clj#L15 |
There are already numerous tests that exercise this function indirectly in https://github.com/cognitect-labs/aws-api/blob/master/test/src/cognitect/aws/signer_test.clj. Here's a direct unit test of the fn:
This produces this outcome:
Please show me a failing test case I can execute. |
Hmmm, I tested this with |
I ran the generative test above with both |
I'm closing this as I'm not able to reproduce this. If you can provide a failing test case (i.e. code that I can paste into a REPL and execute and see fail) I'll be glad to take another look and reopen this if appropriate. |
uncheck-math is hard to test due to run time characteristics. You need to re-eval the defn to see the change in effect. Try this:
|
Ah, tricky. I now see the failure. Fix coming soon. |
Ended up a/ w faster implementation, too. Thanks! |
This PR should fix it: #70
Error example in DynamoDB calls (other APIs have the same issue):
(aws/invoke ddb {:op :ListTables})
Stacktrace:
[[clojure.lang.RT uncheckedByteCast "RT.java" 1379]
[cognitect.aws.signers$uri_encode invokeStatic "signers.clj" 30]
[cognitect.aws.signers$uri_encode doInvoke "signers.clj" 15]
[clojure.lang.RestFn invoke "RestFn.java" 423]
[cognitect.aws.signers$canonical_uri invokeStatic "signers.clj" 59]
[cognitect.aws.signers$canonical_uri invoke "signers.clj" 51]
[cognitect.aws.signers$canonical_request invokeStatic "signers.clj" 106]
[cognitect.aws.signers$canonical_request invoke "signers.clj" 103]
[cognitect.aws.signers$string_to_sign invokeStatic "signers.clj" 115]
[cognitect.aws.signers$string_to_sign invoke "signers.clj" 113]
[cognitect.aws.signers$signature invokeStatic "signers.clj" 135]
[cognitect.aws.signers$signature invoke "signers.clj" 131]
[cognitect.aws.signers$v4_sign_http_request invokeStatic "signers.clj" 157]
[cognitect.aws.signers$v4_sign_http_request doInvoke "signers.clj" 137]
[clojure.lang.RestFn invoke "RestFn.java" 470]
[cognitect.aws.signers$eval36549$fn__36550 invoke "signers.clj" 161]
[clojure.lang.MultiFn invoke "MultiFn.java" 244]
[cognitect.aws.client$send_request invokeStatic "client.clj" 69]
[cognitect.aws.client$send_request invoke "client.clj" 63]
[cognitect.aws.client.api.async$invoke$send__36444 invoke "async.clj" 67]
[cognitect.aws.retry$with_retry$fn__36062$state_machine__23274__auto____36071$fn__36073 invoke "retry.clj" 15]
[cognitect.aws.retry$with_retry$fn__36062$state_machine__23274__auto____36071 invoke "retry.clj" 15]
[clojure.core.async.impl.ioc_macros$run_state_machine invokeStatic "ioc_macros.clj" 973]
[clojure.core.async.impl.ioc_macros$run_state_machine invoke "ioc_macros.clj" 972]
[clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invokeStatic "ioc_macros.clj" 977]
[clojure.core.async.impl.ioc_macros$run_state_machine_wrapped invoke "ioc_macros.clj" 975]
[cognitect.aws.retry$with_retry$fn__36062 invoke "retry.clj" 15]
[clojure.lang.AFn run "AFn.java" 22]
[java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1149]
[java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 624]
[java.lang.Thread run "Thread.java" 748]]
The text was updated successfully, but these errors were encountered: