Fork me on GitHub
Petrus Theron10:08:02

Out-dated link in Datomic Cloud v0.8.54 query exception: (datomic.client.api/q '[:find [?e ...] :where ...] cloud-db) throws Only find-rel elements are allowed in client find-spec, see , which links to on-prem documentation that does support find-coll return, which was confusing. Exception should probably link to

Petrus Theron11:08:47

Does datomic.client.api/with work for prospective tx on Datomic Cloud?

(d/transact cloud-conn {:tx-data []})
=> {:db-before {:database-id "57ad2773-...", :db-name "my-db", :t 3, :next-t 4, :type :datomic.client/db}, :db-after {:database-id "57ad2773-...", :db-name "my-db", :t 4, :next-t 5, :type :datomic.client/db}

(d/with (d/db conn) {:tx-data []}) ;; also throws for actual tx-data values
=> Exception: `clojure.lang.ExceptionInfo: Datomic Client Exception {:cognitect.anomalies/category :cognitect.anomalies/incorrect, :datomic.client/http-result {:status nil, :headers nil, :body nil}}`

Petrus Theron11:08:19

Hi @U072WS7PE. I can't seem to find any logs related to this error, but I'll PM you my log group name. I see other errors about trying to use a missing db function though. (would be cool if I could stream errors related to my queries into REPL)


We are improving error messages with each release. Are you on the latest client and CFT?

Petrus Theron12:08:28

I'm on com.datomic/client-cloud {:mvn/version "0.8.54"} and CFT version 402.


so the first thing I search in any Datomic Cloudwatch log is "Alert - Alerts" -- that text will find all the potentially scary stuff, if any

Petrus Theron13:08:06

Took me about a minute to find the little page icon for CloudFormation template URL on, which you can't right-click on. So I had to go to web inspector to find it. (It's not obvious that clicking on it puts something in your clipboard.)

Petrus Theron13:08:29

Attempting to create a new CloudFormation stack from template triggers Rollback with reason: No export named mysystem-CatalogTable found. Rollback requested by user. (I did not initiate anything)

Petrus Theron13:08:23

Hm, I must have done something wrong - probably didn't tick "Reuse existing storage" to yes, or it didn't detect when I pasted JSON template URL

Petrus Theron13:08:55

Stack started up again, but bastion instance not created

Petrus Theron13:08:41

Why would I not see an "Enable bastion?" option for the latest Solo CloudFormation template (v409)?

Petrus Theron13:08:33

Hmm...maybe I triggered the Storage only template. Trying to fix it via "Update Stack" with the Solo template and enabling bastion triggers a rollback again, with reason Export mysystem-Subnet1 cannot be deleted as it is in use by mysystem sigh I'm going to delete the whole stack and start over again

Petrus Theron13:08:59

Can't recreate stack with same name: No export named "mysystem-Subnet2" found. Rollback requested by user.

Petrus Theron13:08:59

After attempting an upgrade to 409 by deleting my stack as per docs (maybe it wasn't a "first upgrade"?) I had to go via the marketplace to avoid the subnet error and get the VPC options again; so far it doesn't seem to be rolling back. This cloud state management stuff is so complicated.


Wow, that is a bummer. Will investigate.

Petrus Theron13:08:59

Can't recreate stack with same name: No export named "mysystem-Subnet2" found. Rollback requested by user.


With Ions, I’m getting random stack overflows in my code when pushing to AWS,

"java.lang.StackOverflowError, compiling:(buddy/core/bytes.clj:72:15)"
Usually something in buddy, but not the same file every time. This started happening after adding Amazonica to do some S3 stuff. This is on solo, so is it likely to be OOM errors?


@U06B8J0AJ this is definitely solo not having enough mem


Poor solo. Can I edit the official cloud-formation template to use t2.medium or something instead?


No. Solo runs only on t2.smalls. I am considering other options.


If the problem is in compilation then deploying compiled bits may help.


The last time I checked, Amazonica is enormous, and only has a monolithic deploy.


Yeah, I tried my best to rip out large parts of it, but no go. I will consider other options. Perhaps the REST API instead, for now.


I’m making a prototype at my own expense to convince my colleagues to Do The Right Thing, so I’d rather avoid taking on the cost of the production topology at the moment.


But also of course to learn because it’s awesome.


I had similar issues with amazonica myself. It’s a nice library, but I find it a bit too clever and bulky. I ended up just writing some small functions to do what I needed in S3 using interop and the DefaultAWSCredentialsProviderChain. It works great for my needs, and I’m happy to share the code with you if you’d like.


@UBBBNAS6T That would be fantastic, thank you!


  (:import [com.amazonaws                   AmazonServiceException, SdkClientException]
           [com.amazonaws.auth              DefaultAWSCredentialsProviderChain]
           [       AmazonS3, AmazonS3ClientBuilder]
           [ ObjectMetadata, PutObjectRequest]))

(defn default-s3-client []

(defn stack-trace-as-str [e]
  (let [sw (
        pw ( sw)
        _ (.printStackTrace e pw)]
    (str sw)))

(defn put-object-string
  ([bucket-name key-name value]
   (put-object-string (default-s3-client) bucket-name key-name value))

  ([s3-client bucket-name key-name value]
     (let [field-puller (fnil
                         (juxt (memfn getContentMd5)
                               (memfn getETag)
                               (memfn getExpirationTime)
                               (memfn getExpirationTimeRuleId)
                               (memfn getMetadata)
                               (memfn getVersionId)
                               (memfn isRequesterCharged))
                         {:response-obj "no data!"})
            requester-charged?] (field-puller
                                 (.putObject s3-client bucket-name key-name (str value)))]
       (cond-> {}
         md5-hash                (assoc :md5-hash md5-hash)
         etag                    (assoc :etag etag)
         expiration-time         (assoc :expiration-time expiration-time)
         expiration-time-rule-id (assoc :expiration-time-rule-id expiration-time-rule-id)
         version-id              (assoc :version-id version-id)
         true                    (assoc :requester-charged? requester-charged?)))
     (catch AmazonServiceException e (stack-trace-as-str e))
     (catch SdkClientException e (stack-trace-as-str e)))))

🙏 4

I only ever needed stuff on the put side, so there’s not much too this, but here you go anyway 🙂


@UBBBNAS6T Do you manually rip out all AWS libraries you don’t use, or do you find it possible to include the entire SDK?


for s3, I’ve been relying on the dependency that’s transitively included with an ion project, so I didn’t explicitly put it in my deps.edn, but as a rule, I’m only including the parts of the SDK that I am using.


com.amazonaws/aws-java-sdk-sqs {:mvn/version “1.11.382”}


for example


in this case, com.amazonaws/aws-java-sdk-s3 1.11.314 is coming through transitively because of the ion-dev dependency

👍 4

Both deploys AND rollbacks are failing.


Did you deploy to a strong name (git SHA) or a weak one?


If you are deploying to the same weak name over and over, rollback cannot work because you are overwriting the thing to roll back to


That said, the stack overflow thing can be intermittent, so it may be you got lucky the first time and now cannot get back.


No, I consistently use git SHAs for deploy. I think you’re right in that I got lucky. Maybe AWS is rolling back to that one lucky build. I’m worried I’ve screwed something up permanently though. I’m getting failed deploys for older builds even, where Amazonica definitely was absent.


I suffered that problem as well a while back. In my case, it was due to the dep warnings seen during the push step. Once I found the right combination, the stackoverflows went away. My errors were referring to Specter for the stackoverflow but that was not accurate, it’s just where it was executing when it ran out of mem.

Petrus Theron14:08:20

How do I refer to the tx-id in a transact call using Datomic Cloud?


"datomic.tx" if I remember correctly. It's some magic string, you should be able to find it somewhere in the docs.

👍 4
Petrus Theron15:08:25

Where do my Datomic Cloud queries actually run? Do they run on the t2.small EC2 instance, or is that just a transactor?


Bwa ha ha. It is magic!

Petrus Theron16:08:34

So do the nodes live on my Solo topology's t2.small?


Is there any way to install the lambda proxy in a different region than the datomic cluster? I’m trying to use the pre-generate token Cognito trigger so that I can put additional claims for data from Datomic into the idToken that Cognito hands back, but it appears that the Cognito Triggers only work with lambdas that are in the same region as the user pool. Unfortunately, in this case, my user pool is in us-east1, and my Datomic system is in us-east-2.

Petrus Theron17:08:32

How are peeps doing granular application permission filtering on Datomic Cloud without d/filter? I'd like to give my power users Datalog read-query access to whitelisted attributes, but I'm not sure how I'd do that safely.


For those of you using Datomic Cloud and looking for a solution to local development & testing or offline usage, I wrote this library which provides an implementation of the Datomic Client protocols for the Datomic peer in-memory database. We've been using it for about a month at my company and it has made local development and testing on the CI much easier.

👍 16
Petrus Theron08:08:09

I'm still getting d/with Datomic Client Exception with no error on CloudWatch running Solo topology after upgrading to client-cloud v0.8.63:

{:cognitect.anomalies/category :cognitect.anomalies/incorrect, :datomic.client/http-result {:status nil, :headers nil, :body nil}}
Do I need to cycle in my stack?


What version is your stack running server side? (i.e. what CFT did you launch your solo stack with). I will investigate further.


Is there anything like an undocumented alt-port property that I could configure at my transactor, to let peers know that alt-host also uses a different port?


Where I can file a feature request?


@UBY44N2JG under the “suggest a feature portal” located in the top right of your account after login. If you don’t have a account, please let me know and I can create one for you.

Petrus Theron08:08:09

I'm still getting d/with Datomic Client Exception with no error on CloudWatch running Solo topology after upgrading to client-cloud v0.8.63:

{:cognitect.anomalies/category :cognitect.anomalies/incorrect, :datomic.client/http-result {:status nil, :headers nil, :body nil}}
Do I need to cycle in my stack?