This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-10
Channels
- # beginners (50)
- # cider (112)
- # cljs-dev (7)
- # clojure (34)
- # clojure-brasil (1)
- # clojure-greece (4)
- # clojure-italy (8)
- # clojure-nl (14)
- # clojure-russia (4)
- # clojure-uk (94)
- # clojurescript (96)
- # clojutre (5)
- # cloverage (1)
- # cursive (5)
- # datomic (59)
- # docs (53)
- # figwheel (4)
- # fulcro (1)
- # hoplon (1)
- # hyperfiddle (3)
- # jobs (3)
- # luminus (6)
- # nyc (3)
- # off-topic (9)
- # onyx (3)
- # overtone (4)
- # re-frame (2)
- # reagent (16)
- # reitit (9)
- # ring (2)
- # ring-swagger (1)
- # rum (1)
- # shadow-cljs (81)
- # spacemacs (14)
- # specter (12)
- # sql (1)
- # tools-deps (2)
- # vim (110)
is that saying its ok to use :person/name instead of :customer/name or :employee/name ?
and differentiate between customer or employee by other attributes? for ex: :person/department, :person/role for employees.
Seems like Datomic Cloud (with :server-type :ion
) doesn't like namespaced database names?
I also can't seem to list-databases
(https://docs.datomic.com/client-api/datomic.client.api.html#var-list-databases) to work đ
(def cfg {:server-type :ion,
:region "us-east-1",
:system "dev",
:query-group "dev",
:endpoint " ",
:proxy-port 8182})
=> #'user/cfg
(def client (d/client cfg))
=> #'user/client
(d/list-databases client)
CompilerException java.lang.IllegalArgumentException: No single method: list_databases of interface: datomic.client.api.Client found for function: list-databases of protocol: Client, compiling:(/tmp/form-init5702408163425337762.clj:1:1)
I'm having the same error as this user: https://forum.datomic.com/t/issue-retrieving-com-datomic-ion-dependency-from-datomic-cloud-maven-repo/508 except that I can't download the jar at all:
es@bocha:~/src/ion-starter$ aws s3 cp .
fatal error: An error occurred (403) when calling the HeadObject operation: Forbidden
FWIW, this is my version of AWS Tools:
es@bocha:~/src/ion-starter$ aws --version
aws-cli/1.14.28 Python/2.7.12 Linux/4.4.0-130-generic botocore/1.8.32
if I either add --no-sign-request
to the aws
invocation or if I add read permission for arn:aws:s3:::datomic-releases-1fc2183a/*
in the IAM group of the user I have credentials configured for, then the aws cp
succeeds, but I still get the same error when trying to run clj
if I rename my ~/.aws/credentials
to something else, then last cause in the traceback becomes Caused by: com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain
instead of Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 542B5E955147817A; S3 Extended Request ID: (elided)
, so, unlike in the forum report above, it seems the right credentials are getting picked up by clj
it seems I was missing at least one other permission, GetBucketLocation for <s3://datomic-releases-1fc2183a> . actually, if I go lazy and allow all S3 ops for all buckets and objects, then clj
works. I created a new AWS IAM user for this tutorial, and I only assigned it the datomic-admin-ÂÂ$APP-$REGION
policy. I guess most people just use their existing AWS credentials, which have access to everything, and that's why they don't get bitten by this issue?
bottom line: I think permissions to access the datomic repos should be given to the autogenerated datomic-admin-...
policies
Were you using an old account for AWS? You have to have an account that supports EC2-VPC
@jaret: adding these permissions solved it for me:
{
"Sid": "VisualEditor2",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::datomic-releases-1fc2183a",
"arn:aws:s3:::datomic-releases-1fc2183a/maven/releases/*"
]
}
I got the following error trying to perform the initial push in the ions tutorial:
{:command-failed "{:op :push}",
:causes
({:message
"Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 2AF8C01FF6D0B032; S3 Extended Request ID: (elided)",
:class AmazonS3Exception})}
adding the following permissions fixed it:
{
"Sid": "VisualEditor3",
"Effect": "Allow",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::datomic-code-3a1b169a-4a28-4693-8e32-891f20e65112/*",
"arn:aws:s3:::datomic-code-3a1b169a-4a28-4693-8e32-891f20e65112"
]
}
nitpick: I now get the following error when trying to do the initial push. it's obvious that I need to commit the addition of the ion-config.edn, but the tutorial doesn't mention it
{:command-failed "{:op :push}",
:causes
({:message
"You must either specify a uname or deploy from clean git commit",
:class IllegalArgumentException})}
another permissions error. I'm wondering whether I did something wrong in the datomic cloud setup
{:command-failed "{:op :push}",
:causes
({:message
"User: arn:aws:iam::563900263565:user/deitomique is not authorized to perform: codedeploy:RegisterApplicationRevision on resource: arn:aws:codedeploy:eu-central-1:563900263565:application:deitomique (Service: AmazonCodeDeploy; Status Code: 400; Error Code: AccessDeniedException; Request ID: d00b0b01-83f9-11e8-ad19-ad95a71fbe60)",
:class AmazonCodeDeployException})}
finally, I get the following error when trying to invoke the API Gateway endpoint via curl: {"message":"Missing Authentication Token"}
nevermind; I was using the URL as it appears in the Invoke URL, so I was missing the /datomic
at the end of the path
what's this /datomic
suffix all about anyway? should I just add /datomic
at the end of any Invoke URLs exposed via API Gateway, or is that set somewhere (that I missed) in the ion-starter
project?
ions is awesome BTW; I was just pointing out points of friction in the tutorial, should that help
@euccastro That's a recent bug fix in the tutorial. /datomic can be anything... makes sense if you think about having many routes associated with your endpoint based on request path.
If anyone is looking for a super basic, very fast, getting started material for Datomic Ions, Iâve put this together last night: https://twitter.com/tiagoluchini/status/1016698810364461058
hi, is it the case that say limit and offset arenât available in the sync client API?
yes thatâs what Iâm looking at. The async api for say q takes a map of the form {:query '[:find ..] :offset .. :limit ..}
The sync api looks like the same list (or map) form as on prem [:find .. :where.. ]
@eoliphant That's not correct. From the docs "The arity-1 version takes :query and :args in arg-map, which allows additional options for :offset, :limit, and :timeout. See namespace doc."
Need some help to formulate a query. In my application, a character can have a set of skills. Those skills can be based of off other skills. And those skills can be based of off other skills again. How do I write a recursive query which gives me all the skills of a character, but also all the skills those skills reference?
You probably need to use rules: https://docs.datomic.com/on-prem/query.html#rules
You set up two rules with the same name. One that is your base case, one that follows your "skills" chain and recursively calls the rule, again.
Transact the application schema, then transact the test data? It's hard for me to see where what difficulties you're encountering without more context
Hey, I'm still not on ions đ˘ There is cons on run datomic on fargate? Apart from formatting/html issues, is there a problem in this tutorial? https://www.avisi.nl/blog/2018/02/13/how-to-run-the-datomic-transactor-on-amazon-ecs-fargate
Ouch, that looks bad. We just moved to a new website/platform, will ping the devs to fix that.
@U2J4FRT2T I can share large parts of our cloudformation template with you if you like.
Trying to follow the âFirst time upgrade instructionsâ https://docs.datomic.com/cloud/operation/upgrading.html I donât see the âReuse existing storage on createâ option to mark true in my AWS console.. Did they change it on us?
@fingertoe It's there. Are you sure that you copied the storage template?