Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of similar CheckType and CheckDefinition structs #3179

Open
slackpad opened this issue Jun 22, 2017 · 0 comments
Open

Get rid of similar CheckType and CheckDefinition structs #3179

slackpad opened this issue Jun 22, 2017 · 0 comments
Assignees
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

Comments

@slackpad
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/internal-cleanup Used to identify tech debt, testing improvements, code refactoring, and non-impactful optimization type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

2 participants