Fork me on GitHub
jeff tang19:06:36

hi! is it possible to retract a reverse-loookup attribute-value? e.g. [:db/retract 100 :_children 200]


[:db/retract 200 :children 100]


it’s not possible with an underscore attribute

👍 1

you have to reverse the terms


Is it possible to respond to http ion requests with multiple "Set-Cookie" headers? My response using just ring wrap cookies looks like this:

"Headers": {
            "Content-Type": "application/transit+json; charset=utf-8",
            "Set-Cookie": [
This works in ring since for seqs the header is translated to this:
Content-Type: application/transit+json; charset=utf-8
Set-Cookie: jwt-token=eyJraWQiOiJOM0pRej--retracted--sdfw;Path=/;HttpOnly;SameSite=Strict
However the ion spec only allows maps of string->string to be returned, and there is no way to set multiple cookeis with only one line in the header.


Genius - thanks!


This fix works great on Ions with Solo deploy or via Lambda, but it’s failing for me with http-direct.

   :status 200
   :headers {
   :body "{\"data\": \"stuff\"}"
This response from the http-direct handler results in the HTTP response:
< HTTP/2 200
< content-type: application/json
< content-length: 264
< date: Sun, 28 Jun 2020 07:30:54 GMT
< x-amzn-requestid: c3bc8a56-c0bf-41d7-b6b3-24292a2b6509
< x-amzn-remapped-content-length: 264
< set-cookie: b=cookie
< x-amz-apigw-id: O1APLEtPIAMFkGw=
< x-amzn-remapped-server: Jetty(9.4.24.v20191120)
< x-amzn-remapped-date: Sun, 28 Jun 2020 07:30:53 GMT
< x-cache: Miss from cloudfront
… only a single ‘set-cookie’ header when received by the client.


I have also tried different variations of multiValueHeaders (which is supported by API Gateway) but the Ions HTTP direct wrapper seems to ignore those. Would love to hear if anyone else has seen this issue or worked around it (or if it really is a bug)!


I do not use or recommended this CaSE sensitive solution. I just join the cookies with ;


@U2J4FRT2T are you suggesting this?

:headers { "set-cookie": "a=cookie; b=cookie" }
I wasn’t able to find any documentation on combining multiple cookies in the same header but I tried it anyways and found that browsers ignore the 2nd cookie (`b=cookie` in this example).


That’s part of the browser spec. I tried that at first. A new line is required for every cookie. Maybe a \n is needed?


Thanks for the idea! I wasn’t able to get \n to work. I posted the header inconsistency (between :lambdas and :http-direct to the datomic forum). Hopefully someone from the Datomic team will comment.

👍 1
Pedro Silva20:06:13

Hello, I am executing the split stack process to be able to upgrade our Datomic version as described in: After start the delete process in CloudFormation we get an error as you can see in the image. Someone can help us to solve this problem and be able to continue the process? Thank you.


One year ago I deployed a datomic-ions stack After fail 3 times in row I decided to not try updates anymore. Im really sad to see that they still fail at updates

😐 1