scheduler: annotate tasksUpdated with reason and purge DeepEquals (#16421)

* scheduler: annotate tasksUpdated with reason and purge DeepEquals

* cr: move opaque into helper

* cr: swap affinity/spread hashing for slice equal

* contributing: update checklist-jobspec with notes about struct methods

* cr: add more cases to wait config equal method

* cr: use reflect when comparing envoy config blocks

* cl: add cl
This commit is contained in:
Seth Hoenig
2023-03-14 09:46:00 -05:00
committed by GitHub
parent d5e013095d
commit 1a01e87192
13 changed files with 1165 additions and 260 deletions

View File

@@ -8,8 +8,11 @@
* New fields should be added to existing Canonicalize, Copy methods
* Test the structs/fields via methods mentioned above
* [ ] Add structs/fields to `nomad/structs` package
* `structs/` structs usually have Copy, Equals, and Validate methods
* Validation happens in this package and _must_ be implemented
* `structs/` structs usually have Copy, Equal, and Validate methods
* `Validate` methods in this package _must_ be implemented
* `Equal` methods are used when comparing one job to another (e.g. did this thing get updated?)
* `Copy` methods ensure modifications do not modify the copy of a job in the state store
* Use `slices.CloneFunc` and `maps.CloneFunc` to ensure creation of deep copies
* Note that analogous struct field names should match with `api/` package
* Test the structs/fields via methods mentioned above
* Implement and test other logical methods