This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-18
Channels
- # 100-days-of-code (6)
- # announcements (4)
- # beginners (126)
- # cider (49)
- # cljdoc (28)
- # cljsrn (3)
- # clojure (89)
- # clojure-dev (19)
- # clojure-greece (2)
- # clojure-italy (13)
- # clojure-mexico (1)
- # clojure-nl (13)
- # clojure-spec (108)
- # clojure-sweden (1)
- # clojure-uk (48)
- # clojurescript (31)
- # cloverage (3)
- # core-async (16)
- # cursive (28)
- # data-science (3)
- # datascript (1)
- # datomic (60)
- # defnpodcast (1)
- # docker (17)
- # editors (18)
- # emacs (16)
- # events (1)
- # figwheel (22)
- # figwheel-main (4)
- # graphql (26)
- # jobs (2)
- # off-topic (9)
- # om-next (2)
- # overtone (4)
- # perun (1)
- # re-frame (2)
- # reagent (18)
- # reitit (1)
- # ring-swagger (2)
- # shadow-cljs (2)
- # tools-deps (49)
- # uncomplicate (1)
- # unrepl (1)
- # vim (2)
(defn ring-handler
[req]
(do
(cast/dev {:msg "RequestLog" ::request req})
(handler req)))
(def ion-handler
"API Gateway web service for the FMS API"
(apigw/ionize ring-handler))
@U0539NJF7 use cast/event. "NOTE Configuring a destination for cast/dev when running in Datomic Cloud is currently not supported." -- https://docs.datomic.com/cloud/ions/ions-monitoring.html
although the handler generates a response, I cannot see any message with the RequestLog in Cloudwatch
is it possible that the Content-Length header gets stripped away somewhere between API Gateway - Lambda - ionize? Because I'm definitely sending it, but it doesn't arrive on the ion function as a request header.
Is this a good place to mention broken links on the Datomic website?
Well, before I lose track of it, I'll mention it here. The first item under "Getting Started" in the FAQ [1] links here [2] and shows a "page not found" page. [1] https://www.datomic.com/cloud-faq.html#getting-started [2] https://docs.datomic.com/cloud/getting-started/get-datomic.html
Is it true, as this Hacker News comment states, that Datomic Free Edition does not support the client API? https://news.ycombinator.com/item?id=16169118
Ah, I finally found it, after searching for a while: > The Datomic Free transactor is limited to 2 simultaneous peers and embedded storage and does not support Datomic Clients. https://www.datomic.com/get-datomic.html
So, what happens if we excise history from a database? Will the log have a squashed transaction? Will the log not show the history at all?
By «excise history», do you mean "excise all retracted datoms"?
Hi @U0ECYL0ET "The resulting index (and all future indexes) will no longer contain the datoms implied by the excision predicate(s). Furthermore, those same datoms will be removed from the transaction log." -- https://docs.datomic.com/on-prem/excision.html
Thanks! AFAICT from those docs, nothing in excision allows targeting only retracted datoms. Is that an omission in the docs?
In the solo topology of Datomic Cloud, I can still create more than one database (i.e. with d/create-database
), right?
Why am I getting this exception trying to transact some schema?
(let [conn (d/connect client {:db-name "foo"})]
(d/transact conn {:tx-data [#:db{:valueType :db.type/instant, :cardinality :db.cardinality/one, :ident :session/last-used-on}]}))
clojure.lang.ExceptionInfo: Value of :db.install/attribute must be in :db.part/db partition, found :session/last-used-on
The db was just created and is completely empty.I am running Datomic Cloud 441-8505 production topology and com.datomic/client-cloud {:mvn/version "0.8.63"}
.
Strangely if I move :db/ident
to be the first value in the map, the transaction works:
(let [conn (d/connect client {:db-name "foo"})]
(d/transact conn {:tx-data [#:db{:ident :session/last-used-on :valueType :db.type/instant, :cardinality :db.cardinality/one}]}))
=>
{:db-before {:database-id "ae464fcb-0bc3-48f3-b3a4-3c8e9eff1d5a",
:db-name "foo",
:t 3,
:next-t 4,
:type :datomic.client/db},
:db-after {:database-id "ae464fcb-0bc3-48f3-b3a4-3c8e9eff1d5a",
:db-name "foo",
:t 4,
:next-t 5,
:type :datomic.client/db},
:tx-data [#datom[13194139533316 50 #inst"2018-10-18T18:08:00.642-00:00" 13194139533316 true]
#datom[64 10 :session/last-used-on 13194139533316 true]
#datom[64 40 25 13194139533316 true]
#datom[64 41 35 13194139533316 true]
#datom[0 13 64 13194139533316 true]],
:tempids {}}
Relying on the order of keys in a map seems like a bad practice.a much older manifestation of the same thing: https://gist.github.com/favila/785070fc35afb71d46c9#file-restore_datoms-clj-L123-L134
the "install" assertions (which are implicit nowadays) must occur after the constraints they check
I'm getting the ExceptionInfo Forbidden to read keyfile
error when I (d/create-database client {:db-name "test"})
. The troubleshooting page gives this solution:
> Ensure that you have sourced the right credentials with all necessary permissions.
Can somebody unpack that a little? I get the notion of AWS credentials, and I have the access key and secret for a user with all IAM permissions in ~/.aws/credentials
. So presumably something else is wrong. What specifically does 'sourced the right credentials' mean?
It's in the default profile.
The environment that's running the datomic-socks-proxy <stack-name>
process?
OK, interesting. I'm launching from cider, and I'm not sure what's in that environment. But that's enough for me to go on, thanks!
yeah, not sure how you configure system envars in cider specifically, although exporting the envars before you start emacs should do it
By the way, I don't think I missed that anywhere in the Datomic Cloud setup instructions, nor was it listed on that 'troubleshooting' entry. That might be worth adding for people like me in the future.
And/or default the AWS_PROFILE lookup to default
.
Gotcha, so I did miss that…my bad.
This section of the Ion docs says https://docs.datomic.com/cloud/ions/ions-tutorial.html#sec-5-3
> - Under your API in the left side of the UI, click on the bottom choice Settings.
> - Choose Add Binary Media Type, and add the */*
type, then Save Changes.
Why do I need to do this? Will something not work if I skip this step?
@marshall - Sorry, I'm still struggling here. I did export AWS_PROFILE=default
and restarted my datomic-socks-proxy
process. Then I did the same with my REPL. I can confirm that (System/getenv "AWS_PROFILE")
returns "default"
, but I still get the Forbidden to read keyfile
exception. (I also read the docs you linked me to, but didn't see anything amiss.) Is there something else I might be missing?
Ah, figured it out. Apparently the ~/.aws/credentials
file can't have comments. When I manually specified a :creds-profile
value to the d/client
call, that gave me a sufficiently explanatory error message to figure that out. (Or maybe the error was still on d/create-database
, I don't remember now.)
The regular aws
command tolerates comments in ~/.aws/credentials
just fine. Is this a bug?
(Also, the regular aws
command uses the default profile if AWS_PROFILE
is not set, which is another way I was surprised at the behavior of Datomic, FWIW.)