scheduler: fix task-level consul diff (#19230)

Fix `tasksUpdated()` to compare the task level `consul` blocks instead
of the group.
This commit is contained in:
Luiz Aoqui
2023-11-30 10:13:17 -05:00
committed by GitHub
parent 969cdb0f46
commit 59aa860c13

View File

@@ -289,7 +289,7 @@ func tasksUpdated(jobA, jobB *structs.Job, taskGroup string) comparison {
if !at.Vault.Equal(bt.Vault) {
return difference("task vault", at.Vault, bt.Vault)
}
if c := consulUpdated(a.Consul, b.Consul); c.modified {
if c := consulUpdated(at.Consul, bt.Consul); c.modified {
return c
}
if !slices.EqualFunc(at.Templates, bt.Templates, func(a, b *structs.Template) bool { return a.Equal(b) }) {