Fork me on GitHub
#datomic
<
2019-11-14
>
dvingo04:11:07

Is there a recommended practice for the scenario where multiple developers want to iterate (deploy code multiple times a day using :uname for example) on one datomic cloud stack? We're concerned with deploys overwriting each other, resulting in in-development functions being removed by whoever deployed last because their code doesn't have the in-dev code of someone else. One strategy we're considering is to all work on one git branch and always pull and push before deploying, but it would be great if there is a strategy that doesn't involve coordination.

tatut06:11:00

we are doing development locally with http-kit instead of pushing ions. Each developer has their own database, named "$USER-dev" they can freely play around in

tatut06:11:15

that doesn't work for tx functions

dvingo15:11:11

yep, we are doing similar with jetty. I'm wondering specifically about deploys. Is the only solution one query group/stack per developer?

tatut06:11:32

not an expert in that, but the solo topology is so cheap you could easily have one for each developer

grzm15:11:53

Currently attempting to upgrade to com.datomic/ion-dev "0.9.240" from "0.9.231" and seeing

Execution error (IllegalArgumentException) at datomic.ion.cast.impl/fn$G (impl.clj:14).
No implementation of method: :-event of protocol: #'datomic.ion.cast.impl/Cast found for class: nil

grzm15:11:03

This is during a normal cast/event call. The only thing I've changed is updated my deps. Same issue @U6Y72LQ4A reported over the weekend. Anyone else seeing this issue?

grzm15:11:28

The immediate issue is whether I need to update ion-dev to use the analytics features released in 512-8806.

grzm15:11:33

It looks like the issue is tied to the com.datomic/ion "0.9.35" release. If I leave ion at 0.9.34, it's fine.

grzm15:11:31

In my setup: com.datomic/ion "0.9.35" + com.datomic/ion-dev "0.9.234" doesn't work. com.datomic/ion "0.9.34" + com.datomic/ion-dev "0.9.240" does.

pvillegas1218:11:59

Agree on this downgrade solving my problem as well

grzm18:11:22

per @U051V5LLP, looks like calling (datomic.ion.cast/initialize-redirect :stdout) (or likely another redirect option) prior to making any cast is a viable workaround until this gets fixed.

dvingo15:11:13

is this happening when running the code locally?

grzm15:11:41

Yes. ion-dev is only used locally.

dvingo15:11:25

I found that this worked to get rid of those errors locally: (datomic.ion.cast/initialize-redirect :stdout) - invoke it early in your code before any calls to cast

grzm15:11:37

That's interesting. I see that works here as well. That looks like a regression. This wasn't a requirement previously.

grzm17:11:29

@U05120CBV What would be your preferred method of tracking this issue? Should I open a support ticket?

grzm17:11:51

Done! Thanks!

ssdev17:11:25

I'm currently seeing some strange behavior. It seems like my code is not being updated with my deploy. No matter what I deploy the same response keeps getting returned. At one point I deployed a function that returned some json (ex: {showGrid: true}), and even if I go in and hard code what that function should return (now just some text that says "test") it still returns that same json as before. There haven't been any deploy failures. Anyone have any ideas?

henrik20:11:36

Does it pass through a caching layer? CloudFront?

ssdev20:11:58

no. and in fact invoking the function directly in the terminal seems to return the old json as well.

Ian Fernandez19:11:18

People, I want to store a field with a java.time.ZonedDateTime into Datomic, some recommendations?

favila19:11:32

store in a tuple?

favila19:11:31

> A ZonedDateTime holds state equivalent to three separate objects, a LocalDateTime, a ZoneId and the resolved ZoneOffset. The offset and local date-time are used to define an instant when necessary. The zone ID is used to obtain the rules for how and when the offset changes. The offset cannot be freely set, as the zone controls which offsets are valid.

favila19:11:34

(from javadoc)

favila19:11:41

maybe encode the ymd as one long, hms as another, another long for offset, and a string for zoneid

favila19:11:45

if you want to ensure temporal sort order, perhaps the first element in the tuple can be the instant (java util date, or just a long of ms since the epoc) that the zoned-date-time would convert to

ghadi20:11:03

this guy datomics

metal 4
Ian Fernandez19:11:49

make another field with the Zone?

ssdev21:11:01

update on the above issue, when we change the namespace of the code we are deploying, we then see the code update, but if we push and deploy the original namespace with different code, we never see updates, we see the old code running and returning that same old json object. Anyone know why this may be?

m0smith22:11:51

How do I move an Ion from a staging to a production environment when the :app-name has to be defined in the ion-config.edn but needs to change across environments?

steveb8n23:11:24

Q: is there any kind of shutdown hook available when deploying a new Ion version? I want to call the component/stop fn in my servers so that resources are properly cleaned up