Fork me on GitHub
#datomic
<
2018-06-18
>
stuarthalloway11:06:47

@steveb8n your premise is incorrect. Ion transaction functions work exactly like database transaction functions. They differ only in how the code is loaded.

stuarthalloway11:06:13

Is there something in the docs that made this unclear? If so I would like to fix it.

stuarthalloway15:06:08

@steveb8n the next release of ion-dev will have a better error message when you specify the wrong region -- thanks for the report!

gabriele19:06:31

what is the best way to understand where is the problem? (i'm using ions)

gabriele20:06:12

this is a bit frustrating, i cannot deploy, every time it fails and i have no way to know what's wrong

jaret20:06:15

Hi @gabriele.carrettoni what are your deps in your project?

jaret20:06:57

@gabriele.carrettoni and can you look in your Datomic Cloud system logs via these instructions and search for Ion or Exception?

jaret20:06:40

@gabriele.carrettoni ah you have buddy. I think thats the problem. let me confirm, we had a user run into this previously.

steveb8n20:06:11

@stuarthalloway when using the old transactor fns, it was a single api call and it ran on the transactor, where the transactor called any txn fns as part of that single call. with Ions, it’s 2 api calls. 1/ to generate the extra datoms https://github.com/Datomic/ion-starter/blob/master/src/datomic/ion/starter.clj#L154 and 2/ to make them persist https://github.com/Datomic/ion-starter/blob/master/src/datomic/ion/starter.clj#L155

steveb8n20:06:45

in my use case I am using a transactor fn to run a query and then throw an exception if I find a conflict

steveb8n20:06:23

with the Ion pattern, another thread could transact in between those 2 api calls and my check would miss it

stuarthalloway20:06:58

steveb8n nope 🙂

steveb8n20:06:59

FWIW I really like new pattern as it matches the pure db command pattern I am using for all my txns

stuarthalloway20:06:20

that line you linked is not a function call. it is pure data

stuarthalloway20:06:36

executed on the cluster node, inside the transaction

steveb8n20:06:41

ah yes, I see my mistake

steveb8n20:06:03

so it is identical. thanks, clearly I was reading too fast

stuarthalloway20:06:16

well, it is a function call ... but to the function list* 🙂

steveb8n20:06:45

it is one api call, that’s what we need to atomic txn fns, I see that now

steveb8n20:06:59

while we’re chatting, re my other hiccup with testing the web ion sample, I learned about API gateway, resources and methods and made it work without needing /foo in the uri

steveb8n20:06:38

but I think the docs could help avoid that by providing a bit more detail in setting up the API gateway routes

steveb8n20:06:16

it’s a deep rabbit hole so helping noobs not fall straight in will be good for first impressions

steveb8n20:06:06

with that, I’m off to work. but generally stoked about Ion and all the devops work I don’t have to do. great work!

stuarthalloway20:06:53

@steveb8n agreed, and/or maybe have some automation for API Gateway. It is a deep well.

gabriele20:06:26

@jaret removed all extra libraries, still the same

jaret20:06:51

@gabriele.carrettoni it looks like code deploy is having some issues. I am also not able to deploy.

gabriele20:06:19

@jaret but the old version is deploying just fine, when i rollback

jaret20:06:29

Service: AmazonCodeDeploy; Status Code: 500; Error Code: InternalFailure;

gabriele20:06:42

@jaret btw i'm in europe

gabriele20:06:32

where does datomic store logs on the ec2 instance?

gabriele20:06:45

can't seem to find them

jaret20:06:27

Search for your datomic-system name

jaret20:06:40

There should be an error there for the deploy.

gabriele20:06:40

@jaret there are no exceptions

jaret20:06:32

Just to be sure, did you capitalize the E when searching for “Exceptions”

jaret20:06:34

@gabriele.carrettoni apologies… can you confirm you get no results with “Exception”

jaret20:06:39

I added an “s”

jaret20:06:35

@gabriele.carrettoni can you look in your cloudwatch logs for a message “Cluster node starting”

gabriele20:06:05

@jaret "no event... "

jaret21:06:23

@gabriele.carrettoni and you aren’t seeing any alerts in cloudwatch to the left? Do you see a datomic instance with your system name when looking at the ec2 dashboard with a status of “running”

gabriele21:06:05

@jaret i just tried to clone ion-starter and deploy

gabriele21:06:09

and that project works

jaret21:06:58

Well now I am thoroughly confused. You removed all the added deps from the previous project so it should have been effectively the same.

gabriele21:06:13

tell me about that 😅

jaret21:06:31

Ha! Well just to warn you on the buddy front. Buddy and Pedestal use Cheshire which uses jackson and we’ve previously found a conflict with the versions there. The previous client was able to drop buddy altogether, but you should be able to force a newer version of the jackson dep to make it work if you do run into an issue including buddy.

jaret21:06:32

As Stu mentioned we’re working on a new release of Ion-dev that will show deps conflicts at the time of deploy to help troubleshoot those issues without going into the logs.

jaret21:06:53

:dependency-conflicts
 {:deps
  ([com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
    #:mvn{:version "2.6.7"}]
   [com.fasterxml.jackson.core/jackson-core #:mvn{:version "2.6.4"}])