Fork me on GitHub

has anyone had trouble deploying to cloud on ValidateService? the state machine times out on Deployment Complete? for me. Never get the lambda created.


Cases where this can happen include having an error on program startup. For example, when there’s a syntax error or missing dependency. Try running the code with the deps it has in the cloud. (You can’t push code under alias paths I believe )


thanks @U05469DKJ. can you elaborate a little? how do i use the cloud deps to run locally?


what do you mean that I cannot push code under alias paths? does that mean when i push i shouldn’t include -Adev?


Yeah, the bundled code doesn’t include :extra-deps or code under :extra-paths in the dev alias. You can use a dev alias to include ion-dev for push and deploy commands, but the deployed code shouldn’t depend on stuff in :extra-deps/:extra-paths. Try running just clj (no alias) and loading the namespace(s) where your ion handlers live and see if it throws an error or not.


The datomic-client-cloud dependency does not have to be in your deployed deps, since this is one is provided


i don’t have a problem from the repl loading my namespace file • (load-file “/src/datomic-card/core.clj”) • (in-ns ’datomic-card.core) • (hello-world)


deps file

{:paths ["src" "resources"]
 :deps {com.datomic/ion {:mvn/version "0.9.35"}
        org.clojure/data.json {:mvn/version "0.2.6"}
        org.clojure/clojure {:mvn/version "1.10.0"}}

 :mvn/repos {"datomic-cloud" {:url ""}}
 {:dev {:extra-deps {com.datomic/client-cloud {:mvn/version "0.8.78"}
                     com.datomic/ion-dev {:mvn/version "0.9.234"}}}}}


ah, this always gets me when i come back to clojure. my folder is named like my namespace datomic-card changing to underscore fixes the issue. Thank you!

😅 8

I've been trying (but failed so far) to find some definitive documentation on what facilities are available for backup/restore in Datomic Cloud. Does anyone know of any?


Or is it a matter of dealing with the underlying storage in the cloud (i.e. backup the S3 bucket)?


cloud does not have backup/restore like on-prem.


I suspect this problem will be solved in the same time and way as an on-prem<->cloud migration solution


if they consider s3 to be durable enough not to need backup, then the only other use cases are moving to a different cloud installation (workaround: copy all s3 entries while the cluster is off) or to a different storage altogether (i.e. an on-prem migration) or restoring an older point-in-time


Thanks @U09R86PA4, that makes sense. It'd certainly be nice to have an explicit restoration process but working with just what's currently available is possible. The service I'm working on currently is just used during normal work hours (in one time zone) which means that there could be the flexibility for switching off overnight to execute a backup.

Msr Tim15:10:20

Hi is there documentation somewhere that has some guidance of setting up different enviroments for a project. Do I have spin up seperate prod clusters for each enviroment.


You can’t/shouldn’t have separate ion-config per environment. But each compute-stack/application can have it’s own env map (parameter in the CFT). There’s also integration with the aws parameter store

Msr Tim15:10:07

thank you. I will take a look.

Msr Tim15:10:25

I haven't really looked at ions that much. Only cloud hosted datomic.


I see the docs refer to a :schema/see-instead for deprecating an attribute. When I try and use it, it gives me an error datomic.impl.Exceptions$IllegalArgumentExceptionInfo: :db.error/not-an-entity Unable to resolve entity: :schema/see-instead {:entity :schema/see-instead, :db/error :db.error/not-an-entity} any ideas?


This is a hypothetical attribute you create for schema management, not a builtin


Is there an example of what it should look like?


Looks like a cardinality-one ref-type attr


{:db/ident :schema/see-instead :db/cardinality :db.cardinality/one :db/valueType :db.type/ref} is how I would do it


but this is just an example, you can do anything you want


the larger point is put metadata on your attributes


bonus if they’re machine-readable, then you can do things like e.g. generate deprecation lists


Thanks, that helps a lot


I've found some strange behavior in datomic 0.9.5951 query: This works fine:

(d/q '[:find ?e
       :in $ ?uid
       :where [?e :other/id ?uid]]
     (d/db conn) [:user/id user-id])
This throws IllegalArgumentException: Cannot resolve key: [:user/id ?uid]
(d/q '[:find ?e
       :in $ ?uid
       :where [?e :other/id [:user/id ?uid]]]
     (d/db conn) user-id)
Is this expected behavior or...?