Get rid of similar CheckType
and CheckDefinition
structs
#3179
Labels
theme/internal-cleanup
Used to identify tech debt, testing improvements, code refactoring, and non-impactful optimization
type/enhancement
Proposed improvement or new feature
Milestone
The root cause of #3178 was that we have similar structs and copy between them, and we skipped a couple fields. We added a band-aid unit test to make sure we don't forget to copy something in the future, but we should just use a single struct to avoid this issue altogether.
These structs are used in the config of services (and it's different for a single check vs. a check along with a service), the agent API, and they are saved as JSON when we persist check state in the data dir, so we need to be careful with this refactor and add some tests to make sure we don't break reading old persisted checks or the API.
The text was updated successfully, but these errors were encountered: