Confirmed in 0.6.2, 0.6.3, and v0.7.0-beta1
Reproduced in included dev Vagrant VM (Linux)
With auto_revert set to true and a job version greater than 255, a failed deploy will revert to the last stable job with version less than or equal to 255, even when there is a stable version greater than 255.
Other issues, probably related: nomad job history <job> doesn't display jobs past version 255 and nomad job history -version <version> <job> outputs a stack trace if the specified version doesn't exist. Let me know if I should file these separately.
If the last stable job was 256 and job 257 fails, Nomad should revert back to 256. Instead, it will revert to 255 (assuming 255 was stable).
Here's a gist of the script I used to generate 256 stable jobs and a 257th unstable job: https://gist.github.com/hobochili/c714d246d20b8b3c0bf985b2b9a54b5a
In this test, the failing 257th job reverts back to 255 rather than 256. This issue persists for all subsequent failed jobs.
https://gist.github.com/hobochili/762f8ebade8288a7322f81ab7931cf1d
==> Monitoring evaluation "3dea4483"
Evaluation triggered by job "test"
Allocation "3d1e439d" created: node "1b8ac397", group "fail"
Evaluation within deployment: "1b0f1af6"
Evaluation status changed: "pending" -> "complete"
==> Evaluation "3dea4483" finished with status "complete"
https://gist.github.com/hobochili/c714d246d20b8b3c0bf985b2b9a54b5a
Thanks for the detailed report. I will try to reproduce soon and will update with findings!
@hobochili Thanks for the issue! Got it fixed and will be out with 0.7
Most helpful comment
@hobochili Thanks for the issue! Got it fixed and will be out with 0.7