Fork me on GitHub
#datomic
<
2018-08-20
>
joshkh00:08:09

Anywho, off to bed. Thanks for the advice!

eoliphant00:08:42

as of ions becoming available, transaction functions are good to go in cloud, but they do have to be ions

steveb8n01:08:41

@joshkh FWIW I use a combination of transaction fns and https://cjohansen.no/referentially-transparent-crud/ to ensure writes have all the correct associated effects. works well (but only with Ions or on-prem for txn fns)

ckarlsen07:08:20

Hey, looks like the certificate for http://my.datomic.com expired today!

πŸ‘ 4
geoffk08:08:23

yip. creating problems for us too

mkvlr09:08:26

same here

geoffk10:08:53

there's apparently no easy way to get lein to ignore this either

joseayudarte9110:08:34

We have the same problem! Let me know if you find a workaround, please

chrisetheridge10:08:37

you can force trust the certificate locally, but that won’t work for CI boxes

πŸ‘ 4
geoffk10:08:03

i hope Cognitect can provide information on how this happened and what they suggest the community of Datomic users do to prevent being blocked like this again. It's not convenient as it stands.

joseayudarte9110:08:00

Mm I can trust in the browser, but how I do that with Leiningen?

chrisetheridge10:08:47

you need to force-add the certificate to your truststore (different per OS)

joseayudarte9110:08:30

Ah ok! I thought I had already done that with IntelliJ. It was asking about that, but I will double check it, thanks

stuarthalloway11:08:56

This should now be fixed.

πŸ‘ 4
len12:08:38

thanks πŸ‘

Petrus Theron10:08:37

I set up a solo Datomic Ion system last month, but now I'm having trouble getting datomic-socks-proxy to connect to the bastion, despite verifying that my stack is running and bastion instance is running. I've set AWS keys with aws configure and manually with export AWS_ACCESS_KEY=... and secret key. When I run bash datomic-socks-proxy my-system, I get (redacted IP and system name):

download: s3://..../datomic/access/private-keys/bastion to ../../.ssh/datomic--my-system-bastion
OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data /Users/my-user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to 34.249... port 22.
ssh: connect to host 34.249... port 22: Operation timed out
What am I doing wrong here?

Petrus Theron10:08:57

Fixed by adding an inbound rule for SSH port 22 πŸ™‚

len10:08:52

The SSL cert on http://my.datomic.com has expired ?

len10:08:18

we cant build at the moment 😞

chrisetheridge10:08:57

there’s a thread above about this. no message from Cognitect/Datomic team yet

πŸ‘ 4
geoffk10:08:50

@len we can't build either 😞 i imagine many are having problems at the moment.

πŸ‘ 4
len11:08:16

my.datomic is back πŸ‘

chrisetheridge12:08:05

hopefully we get some sort of message here πŸ™‚

stuarthalloway12:08:10

Sorry for the outage! The problem has been resolved and should not occur. Please use the support system https://www.datomic.com/support.html for time-sensitive issues.

Petrus Theron16:08:01

How to do in-memory Datomic testing with datomic.client.api, e.g. for testing Datomic Ions? Do I need to pull in datomic.api as well?

kenny16:08:40

We have been using this for about a month now and it has made development much faster and CI testing far easier: https://github.com/ComputeSoftware/datomic-client-memdb

Mark Addleman16:08:44

This looks cool and seems to support on-prem Datomic. Have you thought about Cloud support?

kenny16:08:00

@UAMEU7QV7 Not sure what you mean. The purpose of this library is to support local development & testing when you use Datomic Cloud in production πŸ™‚ Sorry for the lack of documentation on the lib - haven't had time to write anything.

Mark Addleman16:08:50

Oh. I quickly glanced over the code and thought it was on-prem. This looks great! Thanks!

kenny16:08:24

It essentially provides the Datomic Client API for the on-prem memory DB.

πŸ‘ 4
Petrus Theron09:08:30

Hi @kenny, thanks for this. I'm having a hard time querying the LocalDb, though. I can transact and retrieve the raw datoms I transacted, but when I query an instance of LocalDb with (dc/q ...), no results are not being returned. It seems that the implementation of q from client-impl/Queryable is not being called. Also, transact returns datomic.db.Db in :keys [db-after db--before] instead of LocalDb, which can't be queried directly.

Petrus Theron10:08:06

Hnnng, resolved: I was calling (dc/transact conn [{:db/id -1 :contact/name "Test Name"}]) (which returned just fine) instead of (dc/transact conn {:tx-data [{:db/id "new-entity" :contact/name "Test Name"}]}). Queries now run πŸ™‚ I hope Spec will detect this kind of thing

kenny16:08:05

@U051SPP9Z Yeah, the change in the transact format has bitten me many times. I've commented in this channel about it before and got no response :man-shrugging::skin-tone-2:. Hmm, that is a bug. Also a downside to implementing it the way I did. Can you open that PR against the repo?

kenny16:08:16

Originally I implemented the lib using extend-type on the peer Connection and Db but I ran into the issue of being unable to store extra information on the object (`:db-name` and :t), so I went with the deftype approach. The downside there is that now we need to coerce all returned dbs into LocalDb in order to use them with the Client API.

kenny17:08:26

The other problem was I could not add an implementation of clojure.lang.ILookup to datomic.db.Db because ILookup is an interface, not a protocol. Not sure if there is a workaround for that one.

tlima18:08:44

Question: if I transact the same data twice (same entity, same values) will Datomic create a new transaction for that? i.e. will the transaction counter be updated?

favila19:08:27

every successful transact call makes a transaction entity

favila19:08:18

the smallest possible transaction has one datom: [the-new-tx-id :db/txInstant the-transaction-time true the-new-tx-id]

Petrus Theron09:08:30

Hi @kenny, thanks for this. I'm having a hard time querying the LocalDb, though. I can transact and retrieve the raw datoms I transacted, but when I query an instance of LocalDb with (dc/q ...), no results are not being returned. It seems that the implementation of q from client-impl/Queryable is not being called. Also, transact returns datomic.db.Db in :keys [db-after db--before] instead of LocalDb, which can't be queried directly.

Petrus Theron10:08:06

Hnnng, resolved: I was calling (dc/transact conn [{:db/id -1 :contact/name "Test Name"}]) (which returned just fine) instead of (dc/transact conn {:tx-data [{:db/id "new-entity" :contact/name "Test Name"}]}). Queries now run πŸ™‚ I hope Spec will detect this kind of thing