Fork me on GitHub
#datomic
<
2022-02-14
>
Benjamin09:02:06

ion: what is a good way to check the latest succeeded deploy rev? My app could print it as "version"

Joe Lane14:02:02

Query code deploy

hden01:02:27

What if we are in the middle of a rolling deployment (i.e. multiple versions are running)? How do we know which version did the request hit?

Adam Lewis13:02:10

I'm using on-prem, not cloud, but do use code deploy...so this may not perfectly align with your environment, but what we do is populate the https://docs.oracle.com/javase/tutorial/deployment/jar/packageman.html in MANIFEST.MF as part of our build and then read that back in the running process (e.g. logged on startup, added to response headers, etc.). Our codedeploy descriptor includes a "validate" script which checks that the running version matches the one it (thinks) it just deployed. This helps in cases where, e.g., an old version doesn't cleanly exit and codedeploy scripts think they have deployed a new version, but in reality the old version is still serving requests.

steveb8n05:02:43

I have a step in my CI that stores the git sha and tags into an entity in Datomic. used for deploys of more than just Ions. really useful to have that data 1 query away. Didn’t think about querying code-deploy, that’s a good idea too

Benjamin16:02:18

gotta check that thanks