This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-25
Channels
- # beginners (26)
- # boot (1)
- # cider (21)
- # cljdoc (26)
- # cljs-dev (7)
- # clojure (99)
- # clojure-gamedev (6)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (5)
- # clojure-uk (59)
- # clojurescript (49)
- # clojutre (6)
- # component (13)
- # core-async (2)
- # cursive (30)
- # data-science (2)
- # datomic (29)
- # emacs (9)
- # fulcro (100)
- # hyperfiddle (1)
- # jobs (2)
- # luminus (4)
- # lumo (23)
- # off-topic (22)
- # other-languages (37)
- # parinfer (1)
- # re-frame (2)
- # reagent (5)
- # reitit (12)
- # ring (12)
- # rum (3)
- # shadow-cljs (168)
- # slack-help (1)
- # spacemacs (7)
- # specter (2)
- # tools-deps (8)
- # vim (11)
- # yada (3)
AWS CloudFormation newbie question. I'm experimenting with setting up a apigateway via a cloudstack template. There's one magic number... the CodeDeployDeploymentGroup. I think I could use Fn::ImportValue to read this from the datomic cloud cloudstack if it included an Export for the associated Output.
"CodeDeployDeploymentGroup": {
"Description": "CodeDeploy Deployment Group",
"Value": {
"Fn::GetAtt": [
"Compute",
"Outputs.CodeDeployDeploymentGroup"
]
}
},
Could become
"CodeDeployDeploymentGroup": {
"Description": "CodeDeploy Deployment Group",
"Value": {
"Fn::GetAtt": [
"Compute",
"Outputs.CodeDeployDeploymentGroup"
]
},
"Export": {
"Name": {
"Fn::Sub": "${SystemName}-CodeDeployDeploymentGroup"
}
},
},
(or similar, from that template i think you'd use "Ref": "AWS::StackName"
as the system name component)
The alternative seems to be modifying the root stack to reference my app specific apigateway stack. Not sure if that's normal or recommended and how that might interplay with datomic cloud updates.
Question really is: am I missing something?Not answering your question but you might consider using Crucible instead to generate your templates. Even just having functions available makes it a lot easier. Here’s an example https://github.com/hlprmnky/ion-appsync-example/blob/master/src-pages/cf/node_pages.clj
Thanks @U0510KXTU I thought I'd aim for zero helpers/libs/tooling first to get familiar with what's underlying things. Presume it's something I'd outgrow. Look forward to checking out your code and understanding how it's helpful.
maybe looking at how those CF value/fns are built will get you closer to how to infer/import the group you are trying to access
Here's the simple template I came up with. Effectively what would be generated from following the ion-tutorial (but not using {proxy+} so slightly simpler) https://gist.github.com/olivergeorge/c3918c52b89278a9c1807c9d47a9860e
I used a Parameter since the datomic stack doesn't export the compute group name... if they did the ImportValue thing should do the trick .
@U0510KXTU that json feels very similar to your code doesn't it.
yep. the only downside I’ve noticed is refs are string joins which are a bit more complex
In your experience, what approach would you use for setting up an apigateway to complement a datomic cloud app (with ions)? I'm largely guessing but the options seem like: (1) a "nested stack" approach provides access to the compute group name and connects the datomic stack lifecycle events to the apigateway stack. (2) treat as stand alone cloudformation and refer to the compute stack by the known group name (3) other.. (aka I need to learn more about cloudformations and devops practices on AWS)
I’ve already done this 🙂 I used Crucible to generate the APIGW and passed in the name of the compute stack as a parameter so that my fns can generate the AWS ARNS using string joins
Gotcha thanks (and cool!)
Hi, I’m getting a weird error when I try to retract a unique constraint on an attribute
(d/transact conn {:tx-data [[:db/retract :otu-seq/otuid :db/unique :db.unique/identity]]})
ExceptionInfo nth not supported on this type: Db clojure.core/ex-info (core.clj:4739)
I just added ring
as a dependency to my Datomic/Ions project, and now I get this:
Refresh Warning: Reflection warning, cognitect/hmac_authn.clj:80:12 - call to static method encodeHex on org.apache.commons.codec.binary.Hex can't be resolved (argument types: unknown, java.lang.Boolean).
Refresh Warning: Reflection warning, cognitect/hmac_authn.clj:80:3 - call to java.lang.String ctor can't be resolved.
Removing ring
from deps.edn
removes the error.
Has anyone else seen this?Hi, rather short question: is it possible to transact multiple values for a :db.cardinality/many attribute using the list form? Something along those lines:
[[:db/add "my-ident" :foo/bar-refs [ref-ident-1 ref-ident-2]]]
I think you can't do that here, but you can in map form. If you think about it, this is ambiguous. ref-ident-1 could be a keyword and ref-ident-2 could be a value, making the inner vector an entity reference.
@marshall following this example i got an invalid list form error (the same happens using my example above)