This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-30
Channels
- # announcements (15)
- # beginners (99)
- # boot (15)
- # cider (105)
- # cljdoc (2)
- # cljs-dev (17)
- # clojure (132)
- # clojure-conj (1)
- # clojure-dev (5)
- # clojure-italy (19)
- # clojure-losangeles (2)
- # clojure-nl (20)
- # clojure-spec (70)
- # clojure-uk (50)
- # clojurescript (153)
- # core-logic (9)
- # cryogen (4)
- # cursive (6)
- # datomic (40)
- # duct (5)
- # figwheel-main (10)
- # fulcro (245)
- # hoplon (1)
- # jobs (3)
- # leiningen (12)
- # mount (8)
- # nrepl (11)
- # off-topic (1)
- # pathom (16)
- # pedestal (3)
- # planck (17)
- # re-frame (3)
- # reitit (8)
- # shadow-cljs (64)
- # spacemacs (3)
- # specter (20)
- # tools-deps (21)
has anyone successfully deployed a CORS enabled api gateway for datomic ions? it's doing my head in. setting the API's Binary Media Types
to */*
returns my edn/json/transit as expected but breaks CORS. removing */*
fixes CORS but all responses come back base64 encoded.
I've dumbed it all down to json, the gateway's default:
(defn test-public-handler
"A test handler"
[{:keys [headers body]}]
{:status 200
:headers {"Content-Type" "application/json"
"Access-Control-Allow-Origin" "*"}
:body (json/write-str {:test 123})})
I'm trying to setup AWS Codebuild for continuous integration of ions but can't get ion push to work. Getting the following error: "VPC endpoints do not support cross-region requests (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: B45398A68E31CD5C; S3 Extended Request ID: ZKoYFM1MHiGru6sw5tyy3nVslwFKbnkVXp4PU4ASWRKjbzMzKiufyZWLOFSJhyHDQ2yKybhj/3g=)"
datomic-peer
throws a NPE
from datomic.db.ProcessInpoint.inject
when I try to (d/with db [{nil "value"}])
by trying to call (namespace nil)
@joe.lane to try out, I gave it an assumed role with all permissions in the policy
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "*",
"Resource": "*"
}
]
}
I think it has something to do with downloading dependencies from <s3://datomic-releases-1fc2183a/maven/releases/>
yeah, I saw that too, but until I know what is the exact problem, it's difficult to start looking for solutions in the VPC world of AWS 🙂
I’m having trouble writing a transaction to add an entity to an existing one to many relationship in datomic … something like this is failing me:
Can someone help me or point me to a resource on how to add to a ref attribute that has cardinality many?
maybe try wrapping the value of :user/docs
in a vector? :user/docs [{:doc/id (d/squuid) :doc/name "Foo"}]
@fuentesjr 2 things. 1) what @joshkh said ^, cardinality/many assertions need to be in a vector, and if you’re asserting a lookup ref, which is a vector itself, you’ll need 2 vectors (i.e. [[:doc/id 12345]]
)
2) you’re mixing list and map form in your transaction. I would use the map form:
{:db/id 17592186045419 :user/docs [{:doc/id (d/squuid....]}
:message “:db.error/not-an-entity Unable to resolve entity: #:barber{:id #uuid \“5bd89d31-4fcf-4ce1-b82b-15ef047a8d6e\“, :name \“Foo\“} in datom [17592186045419 :barbershop/barbers #:barber{:id #uuid \“5bd89d31-4fcf-4ce1-b82b-15ef047a8d6e\“, :fname \“Foo\“}]
@fuentesjr not a technical explanation, but whatever values you transact in the one-to-many vector are treated as additions, so you don't need to include previous values. pretty sure it's a Set in the background.
becomes obvious once you get the hang of it, but a slight gotcha if you're used to setting & replacing values.
@joshkh @marshall Thank you guys. I was able to commit the transaction after wrapping the doc entity in a vector and sticking to the map form
By the way, if I wanted to remove one of those documents at some point, would I retract the document?
for your one-to-many relationship you'd retract in the same way: supply a vector of ref id's to remove from the collection
Is anyone from Datomic Support around? I'm having trouble deploying to Ions due to the CodeDeploy rolling back. Seems like the same issue as I worked on with @jaret yesterday.
I'm following the datomic ions tutorial and I can't pull the datomic ion dependency from s3:
aws s3 cp .
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
My aws cli tool is configured with my work AWS account, is there some permission that is expected that I don't have?I often receive this error when running an Ion after recently deploying Ions:
java.io.IOException: Connection reset by peer: datomic.ion.lambda.handler.exceptions.Fault
datomic.ion.lambda.handler.exceptions.Fault: java.io.IOException: Connection reset by peer
Is there a way to fix this?