+1 on this, I would be curious about solutions/answers here too
Yes, of course. But Im looking for a way to expose any transaction related information (in my case to expose some definition of created at). As it stands now there doesn't seem a way to expose transaction data
A possibility for us would be to expose multiple presto endpoints on different d/as-of
. That'd also ensure a consistent view of the data.
Have you considered adding a “creating-tx” and “last-modifying-tx” attribute to your entities that references a transaction? That would be both faster (no history index needed to determine it) and exposable via pendo
1and would still tie these times precisely to transactions and their txinstant
That's clever @favila
Those attributes could be applied generally too, no need to make :user/creating-tx
.
Thatd allow for indexing too. Sounds promising. I'll suggest it to the team. Just need to make sure to include that attribute in related transactions (but that could be generic too I recon)... Thanks!
I'm having trouble installing the ion-dev tools as per https://docs.datomic.com/cloud/operation/howto.html#ion-dev. It looks like it's not able to retrieve the ion maven artifacts. When I run clj
in the root of the ion-starter
project, I get:
➜ ion-starter git:(master) ✗ clj
Downloading: com/datomic/ion/0.9.50/ion-0.9.50.pom from datomic-cloud
Downloading: com/datomic/ion/0.9.50/ion-0.9.50.jar from datomic-cloud
Error building classpath. Could not find artifact com.datomic:ion:jar:0.9.50 in central (<https://repo1.maven.org/maven2/>)
My $HOME/.clojure/deps.edn
looks like:
{
:aliases {
:ion-dev {:deps {com.datomic/ion-dev {:mvn/version "0.9.282"}}
:main-opts ["-m" "datomic.ion.dev"]}
}
:mvn/repos {
"datomic-cloud" {:url "<s3://datomic-releases-1fc2183a/maven/releases>"}
}
}
What am I doing wrong?It’s not able to download from the Datomic s3 repo
You need aws creds active that have s3 permissions
https://docs.datomic.com/cloud/operation/howto.html#aws-access-keys
https://clojure.org/reference/deps_and_cli#_maven_s3_repos This will provide further information for how to properly source credentials depending on which/where.
Hm, I'm pretty sure I did this already. I added the Datomic Administrator Policy (`datomic-admin-taxman-us-east-2`) policy to the role I'm logged in with and can successfully run datomic client access taxman
, but I can't access the maven artifacts with those same creds. Upon closer inspection it looks like the Datomic Administrator Policy doesn't actually provide access to the <s3://datomic-releases-1fc2183a/maven/releases>
bucket. Is there another policy somewhere I need to add in order to enable this access?
Can you try clj -M:ion-dev
from your actual project?
@mike.j.cusack that gives me the same error..
My understanding from the instructions was that the only role I needed to add was the Datomic Administrator Policy, but when I look in that policy it doesn't provide access to the <s3://datomic-releases-1fc2183a/maven/releases>
bucket. Should it?
The bucket isn't yours
That's true. I'm wondering how I'm supposed to get permission to read from it?
Is that your full deps.edn or just a snippet?
And you can aws s3 ls
?
that's the full deps.edn, with comments elided. i can run aws s3 ls
and it shows me my own buckets.
Try clj -M:ion-dev
in a new repl. The error above isn't even for ion-dev, but ion.
I tried it in a blank directory w/no deps.edn
and I get the same error
Running the command I provided?
well, not exactly the same. i get this:
WARNING: Use of :deps in aliases is deprecated - use :replace-deps instead
Downloading: com/datomic/ion-dev/0.9.282/ion-dev-0.9.282.pom from datomic-cloud
Downloading: com/datomic/ion-dev/0.9.282/ion-dev-0.9.282.jar from datomic-cloud
Error building classpath. Could not find artifact com.datomic:ion-dev:jar:0.9.282 in central (<https://repo1.maven.org/maven2/>)
yes, clj -M:ion-dev
So that's not the same error, but similar
Which version of cli tools are you running?
➜ tmp git:(master) clj --version
Clojure CLI version 1.10.2.796
@alexmiller Does this make any sense to you?
Can you provide the full home deps.edn?
;; The deps.edn file describes the information needed to build a classpath.
;;
;; When using the `clojure` or `clj` script, there are several deps.edn files
;; that are combined:
;; - install-level
;; - user level (this file)
;; - project level (current directory when invoked)
;;
;; For all attributes other than :paths, these config files are merged left to right.
;; Only the last :paths is kept and others are dropped.
{
;; Paths
;; Directories in the current project to include in the classpath
;; :paths ["src"]
;; External dependencies
;; :deps {
;; org.clojure/clojure {:mvn/version "1.9.0"}
;; }
;; Aliases
;; resolve-deps aliases (-R) affect dependency resolution, options:
;; :extra-deps - specifies extra deps to add to :deps
;; :override-deps - specifies a coordinate to use instead of that in :deps
;; :default-deps - specifies a coordinate to use for a lib if one isn't found
;; make-classpath aliases (-C) affect the classpath generation, options:
;; :extra-paths - vector of additional paths to add to the classpath
;; :classpath-overrides - map of lib to path that overrides the result of resolving deps
;; :aliases {
;; :deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.5.442"}}}
;; :test {:extra-paths ["test"]}
;; }
:aliases {
:ion-dev {:deps {com.datomic/ion-dev {:mvn/version "0.9.282"}}
:main-opts ["-m" "datomic.ion.dev"]}
;; :new {:extra-deps {seancorfield/clj-new {:mvn/version "1.1.228"}}
;; :main-opts ["-m" "clj-new.create"]}
;; :rebl {:extra-deps {com.cognitect/rebl {:mvn/version "0.9.242"}
;; org.openjfx/javafx-fxml {:mvn/version "15-ea+6"}
;; org.openjfx/javafx-controls {:mvn/version "15-ea+6"}
;; org.openjfx/javafx-swing {:mvn/version "15-ea+6"}
;; org.openjfx/javafx-base {:mvn/version "15-ea+6"}
;; org.openjfx/javafx-web {:mvn/version "15-ea+6"}}
;; :main-opts ["-m" "cognitect.rebl"]}
;; :reveal {:extra-deps {vlaaad/reveal {:mvn/version "1.1.163"}}
;; :ns-default vlaaad.reveal
;; :main-opts ["-m" "vlaaad.reveal" "repl"]
;; :exec-fn repl}
}
;; Provider attributes
:mvn/repos {
;; "central" {:url "<https://repo1.maven.org/maven2/>"}
;; "clojars" {:url "<https://repo.clojars.org/>"}
;; "cognitect-dev-tools" {:url "<https://dev-tools.cognitect.com/maven/releases/>"}
"datomic-cloud" {:url "<s3://datomic-releases-1fc2183a/maven/releases>"}
}
}
Try renaming that file and try
{:aliases {:ion-dev {:extra-deps {com.datomic/ion-dev {:mvn/version "0.9.282"}}
:main-opts ["-m" "datomic.ion.dev"]}}
:mvn/repos {"datomic-cloud" {:url "<s3://datomic-releases-1fc2183a/maven/releases>"}}}
same error 😓
Did you copy/paste that directly?
yes
Hmm, this isn't making sense at all to me
me either.. i really appreciate your taking the time to help tho!
1👍Do you have any custom settings in .m2/?
is that s3 url supposed to be public? i.e. if i have any s3 access should i be able to do aws s3 ls <s3://datomic-releases-1fc2183a/maven/releases>
It should be. That's why the instructions are just to add the dep and repo
oh dang yes i do!
That command doesn't work for me
that was it! i had an old datomic-cloud
key in my ~/.m2/settings.xml
- i removed it and now it works!
There we go
The one for dev-tools is still needed if you use it
1👍I'm seeings this warning with exception when calling (d/shutdown true) at the end of a java process's life. It appears to be benign, but I'm curious if there's anything I can fix to prevent it:
We're on com.datomic/datomic-pro "0.9.6024"
at the moment.
Oof -- pretty obvious. I needed to handle shutting down my clojure resources separately. So s/shutdown false
no longer results in the warning.