Skip to content

Commit

Permalink
Stops AQR from fixing errors by default (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-afedorov committed Jun 10, 2019
1 parent b8d6b98 commit 38d3448
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/runners/alert_queries_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def log_failure(query_name, e, event_data=None, description=None):
alerts = [json.dumps({
'ALERT_ID': uuid.uuid4().hex,
'QUERY_ID': '3a3d173a64ca4fcab2d13ac3e6d08522',
'QUERY_NAME': 'Query Runner Failure',
'QUERY_NAME': f'Error in {query_name}',
'ENVIRONMENT': 'Queries',
'SOURCES': ['Query Runner'],
'ACTOR': 'Query Runner',
Expand Down Expand Up @@ -137,7 +137,7 @@ def merge_alerts(query_name, from_time_sql):
from_time_sql=from_time_sql,
new_alerts_table=f"RUN_{RUN_ID}_{query_name}",
)
result = db.execute(sql).fetchall()
result = db.execute(sql, fix_errors=False).fetchall()
created_count, updated_count = result[0]
log.info(f"{query_name} created {created_count}, updated {updated_count} rows.")
return created_count, updated_count
Expand All @@ -160,7 +160,7 @@ def create_alerts(rule_name: str) -> Dict[str, Any]:
query_name=rule_name,
from_time_sql="DATEADD(minute, -90, CURRENT_TIMESTAMP())",
to_time_sql="CURRENT_TIMESTAMP()",
))
), fix_errors=False)
insert_count, update_count = merge_alerts(rule_name, GROUPING_CUTOFF)
metadata['ROW_COUNT'] = {
'INSERTED': insert_count,
Expand Down

0 comments on commit 38d3448

Please sign in to comment.