mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Check that JobPlanResponse Diff Type is None before checking for changes on getExitCode (#14492)
This commit is contained in:
committed by
GitHub
parent
536260c7bb
commit
9af5990472
3
.changelog/14492.txt
Normal file
3
.changelog/14492.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
cli: Fixed a bug where plans for periodic jobs would return exit code 1 when the job was already register
|
||||
```
|
||||
@@ -391,6 +391,10 @@ type namespaceIdPair struct {
|
||||
// * 0: No allocations created or destroyed.
|
||||
// * 1: Allocations created or destroyed.
|
||||
func getExitCode(resp *api.JobPlanResponse) int {
|
||||
if resp.Diff.Type == "None" {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Check for changes
|
||||
for _, d := range resp.Annotations.DesiredTGUpdates {
|
||||
if d.Stop+d.Place+d.Migrate+d.DestructiveUpdate+d.Canary > 0 {
|
||||
|
||||
Reference in New Issue
Block a user