Fork me on GitHub
#datomic
<
2019-07-22
>
ghadi16:07:05

not terrible at all, have you seen codeq?

hadils16:07:43

Hi! Any suggestions on testing Lambda/APIGW ions on a local MacOS laptop? I am trying out AWS SAM. How do I build a deployment package for my application locally? Is it just the zip file that I would deploy to Datomic Cloud?

eoliphant12:07:27

There’s no ‘package’ per se with ions, though the ‘push’ does shoot your code as is + dependencies up to an S3 bucket/folder. I’d check out Stu’s videos on the typical workflow. but in general it’s very much in line with your typical REPL-driven/oriented workflow. You can test/exercise your generic pure funcs as is, you can connect to the db in question from the repl, most ion/datomic funcs that can be ‘embedded’, like transaction functions, are pure can (and should) be t tried out directly. At that point, you can then push, then interactively exercise them on the server. I’m literally doing that right now. Helping one of my devs optimize some stuff, so I created a new transaction func, spec’d and tested it totally client side, then ‘allowed’ and pushed it, and ran some actual transactions that referenced it.

hadils17:07:51

So you avoided the whole SAM local workflow, then?

eoliphant15:07:08

sorry just saw lol, yeah, there’s less need for it IMO. while tx, query, etc funs do have to be on the server at some point. You can generally do a ton of testing, etc with them locally, so by the time you actually push them, you’re pretty confident that they’re doing what you expect.

joshkh17:07:33

must query functions be deployed to the main (cloud) Compute node, or can they be deployed as part of Query Groups?

joshkh18:07:13

update: yes. found it in the docs 🙂

ghadi18:07:18

Anywhere :)

joshkh18:07:26

hmm, are you sure? i have a query group that makes use of query functions. i recently removed them from the main compute group and now the query groups fail.

joshkh18:07:11

by removed i mean that the query functions were defined in both Ions projects due to forking the code base. when i removed them from the main compute group's configuration and deployed to the main compute group the query groups then failed.

marshall18:07:40

@joshkh failed to do what?

marshall18:07:56

you can definitely have a different set of query functions on your primary group than on a given query group

marshall18:07:10

but you can only invoke them if you are connected to that query group

joshkh18:07:51

yup, that's what i'm thinking. i might be deploying to the query group but connecting to the main compute group.

joshkh19:07:01

upon further testing, it looks like the client's :endpoint value overrides the client's :query-group value, but only when running locally.

PB21:07:14

@ghadi I have not seen codeq