scheduler: overhaul util.go/tasksUpdated #16290
Labels
stage/accepted
Confirmed, and intend to work on. No timeline committment though.
theme/cleanup
type/bug
tasksUpdated is a critical block of code that determines whether a replacement alloc will be necessary upon diffing the task group of two jobs. However it provides no trace of why a task group is determined to need replacing - it merely returns a boolean and logs nothing.
Also we should stop using
reflect.DeepEqual
for comparison here (or anywhere). It does not do the "right" thing when comparing e.g. nil vs empty slices, and has other gotchas. We should writeEqual
methods for every type, or defer togo-cmp
with custom comparators.Context: in investigating #16238 it seems something has broken in-place updates for services but it's not clear what.
The text was updated successfully, but these errors were encountered: