Oh wow. Just noticed a bunch of functions in cognitect.aws.credentials
have been pulled out into nice helpers. This cleans up a ton of code. Thank you!
Just be sure to rely only on the documented functions 🙂
Functions with "For internal use. Do not call directly." may change without warning.
the aws libraries don't seem to be on Clojars, is that correct?
Correct.
Just maven
yeah ok cool, why if I may ask?
easier to have just in one place?
Honestly, it was a decision made over a year ago. Don't remember why.
yeah sure, the clojars badge saves some work imho for the readme
@andrea.crotti what badge?
this one for example
you see it lots of libraries, just keeps track of the latest version automatically
aws-api uses at least three artifacts to do anything useful
the client, the endpoints, and N>=1 services that you're using
kaocha does something similar, and with a nice table https://github.com/lambdaisland/kaocha
There are badges for maven too, https://github.com/softwaremill/maven-badges
The problem with them, however, is that you can't copy and paste from them into your deps.edn 😉
i don't find this very useful unless it's copypastable, and I'd prefer it to be in deps.edn format
What we have on aws-api is less pretty, but more useful IMO.
jinx
What @ghadi said (after I said it) 😉
https://github.com/cognitect-labs/aws-api#deps and https://github.com/cognitect-labs/aws-api/blob/master/latest-releases.edn
👍
I'm struggling again with the same error
{:cognitect.anomalies/category :cognitect.anomalies/fault,
:cognitect.aws.client/throwable #error {
:cause "Property null is not supported"
:via
but this time when I try to do a ListObjects
operation like
(aws/invoke (s3-client) {:op :ListObjectsV2
:request {:Bucket "bucket"}})
the returned XML seem to be something like
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="<http://s3.amazonaws.com/doc/2006-03-01/>"><Name>bucket</Name><Prefix></Prefix><KeyCount>0</KeyCount><MaxKeys>10000</MaxKeys><Delimiter></Delimiter><IsTruncated>false</IsTruncated></ListBucketResult>
with the same client/config putting and fetching an object works fine
do you have the full :via
stacktrace?
[{:type java.lang.IllegalArgumentException
:message "Property null is not supported"
:at [com.sun.xml.internal.stream.XMLInputFactoryImpl setProperty "XMLInputFactoryImpl.java" 246]}]
:trace
[[com.sun.xml.internal.stream.XMLInputFactoryImpl setProperty "XMLInputFactoryImpl.java" 246]
[clojure.data.xml$new_xml_input_factory invokeStatic "xml.clj" 323]
[clojure.data.xml$new_xml_input_factory invoke "xml.clj" 319]
[clojure.data.xml$source_seq invokeStatic "xml.clj" 332]
[clojure.data.xml$source_seq doInvoke "xml.clj" 326]
[clojure.lang.RestFn applyTo "RestFn.java" 139]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$apply invoke "core.clj" 660]
[clojure.data.xml$parse invokeStatic "xml.clj" 346]
[clojure.data.xml$parse doInvoke "xml.clj" 340]
[clojure.lang.RestFn invoke "RestFn.java" 486]
[cognitect.aws.util$xml_read invokeStatic "util.clj" 137]
[cognitect.aws.util$xml_read invoke "util.clj" 134]
[cognitect.aws.shape$xml_parse invokeStatic "shape.clj" 217]
[cognitect.aws.shape$xml_parse invoke "shape.clj" 214]
[cognitect.aws.protocols.rest$parse_body invokeStatic "rest.clj" 247]
[cognitect.aws.protocols.rest$parse_body invoke "rest.clj" 235]
[cognitect.aws.protocols.rest$parse_http_response invokeStatic "rest.clj" 260]
[cognitect.aws.protocols.rest$parse_http_response invoke "rest.clj" 249]
[cognitect.aws.protocols.rest_xml$eval17611$fn__17612 invoke "rest_xml.clj" 23]
[clojure.lang.MultiFn invoke "MultiFn.java" 239]
[cognitect.aws.client$handle_http_response invokeStatic "client.clj" 48]
[cognitect.aws.client$handle_http_response invoke "client.clj" 42]
[cognitect.aws.client$send_request_STAR_$fn__24125 invoke "client.clj" 82]
[clojure.core.async.impl.channels.ManyToManyChannel$fn__4659$fn__4660 invoke "channels.clj" 95]
[clojure.lang.AFn run "AFn.java" 22]
[java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1128]
[java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 628]
[java.lang.Thread run "Thread.java" 835]]
same thing as what I had a few days ago, the error just says it can't parse the XML
can you file an issue with this info and we can take a look at it?
this stacktrace helps
also @andrea.crotti need the computed deps versions from your project (specifically for clojure.data.xml)
looks like it [org.clojure/data.xml "0.0.8"]
which should be the latest
https://github.com/cognitect-labs/aws-api/blob/master/deps.edn#L9
0.0.8 doesn't seem right
latest stable at least
from https://github.com/clojure/data.xml, but I can try to change it
I wonder how your deps are getting overridden to the wrong version
That's definitely most likely the issue.
And even though the data.xml version is alpha6, it's been that way since Nov 2018. That's one definition of stable 😉
@andrea.crotti are you using tools.deps, leiningen, other?
ah well sadly upgrading data.xml makes something else blow up
so I can't try it directly
but I'll keep digging
thanks in the meanwhile
you should inspect your lein deps :tree
for conflicts
no it's just some code we have in a utils.clj file