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

engine: new module for alert metrics #2177

Merged
merged 37 commits into from
Mar 8, 2022
Merged

Conversation

dctalbot
Copy link
Contributor

@dctalbot dctalbot commented Feb 17, 2022

  • Identified the issue which this PR solves.
  • Read the CONTRIBUTING document.
  • Code builds clean without any errors or warnings.
  • Added appropriate tests for any new functionality.
  • All new and existing tests passed.
  • Added comments in the code, where necessary.
  • Ran make check to catch common errors. Fixed any that came up.

Description:
This PR introduces a new engine module for creating and populating a new alert_metrics table. It prioritizes newly-closed alerts, but will eventually process all remaining closed alerts.

Which issue(s) this PR fixes:
Fixes #2121

How to review:

  • make regendb
  • See the theory of operation described in engine/metricsmanager/update.go
  • Verify that the code implements the algorithm described
  • make start
  • Verify the new engine_processing_versions.state column is populated
  • Verify the new alert_metrics table is populated

Additional Info:

  • Every table must have a unique id column in order to be compatible with the switchover tool.
  • A test for this was written and verified, but it is not included in this PR. We decided to wait until to graphql layer is implemented to avoid mixing the concerns of smoke tests.

@dctalbot dctalbot marked this pull request as ready for review February 24, 2022 18:09
mastercactapus
mastercactapus previously approved these changes Mar 7, 2022
mastercactapus
mastercactapus previously approved these changes Mar 7, 2022
@dctalbot dctalbot merged commit bdcc50d into master Mar 8, 2022
@dctalbot dctalbot deleted the alert-metrics-new-engine branch March 8, 2022 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

engine/metricsmanager: new engine module for alert metrics
4 participants