The Nomad stream does not transfer job version in allocations because that information is explicitly removed in the source code before sending.
Assuming I am observing everything from Nomad stream - allocations, deployments, evaluations and job updates about a specific job - how do I get the job version of an allocation?
An allocation has EvalID, so I can find evaluation. However, some evaluations do not have JobModifyIndex and some have JobModifyIndex equal to 0 (??). Is it quaranteed that every evaluation has DeploymentID? Then I could do:
deployments[evaluations[allocation.EvalID].DeploymentID].JobVersion
. Is this the preferred way?