mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[release tests] limit number of results fetched for alerting (#17430)
This commit is contained in:
parent
411c49746d
commit
2ae6b944a2
1 changed files with 5 additions and 1 deletions
|
@ -32,6 +32,8 @@ GLOBAL_CONFIG["SLACK_WEBHOOK"] = os.environ.get("SLACK_WEBHOOK", "")
|
|||
GLOBAL_CONFIG["SLACK_CHANNEL"] = os.environ.get("SLACK_CHANNEL",
|
||||
"#oss-test-cop")
|
||||
|
||||
RESULTS_LIMIT = 200
|
||||
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(logging.INFO)
|
||||
handler = logging.StreamHandler(stream=sys.stdout)
|
||||
|
@ -69,6 +71,7 @@ def fetch_latest_alerts(rds_data_client):
|
|||
last_notification_dt
|
||||
FROM {schema}
|
||||
ORDER BY category, test_suite, test_name, last_notification_dt DESC
|
||||
LIMIT {RESULTS_LIMIT}
|
||||
""")
|
||||
|
||||
result = rds_data_client.execute_statement(
|
||||
|
@ -114,7 +117,8 @@ def fetch_latest_results(rds_data_client,
|
|||
},
|
||||
]
|
||||
|
||||
sql += "ORDER BY category, test_suite, test_name, created_on DESC"
|
||||
sql += "ORDER BY category, test_suite, test_name, created_on DESC "
|
||||
sql += f"LIMIT {RESULTS_LIMIT}"
|
||||
|
||||
result = rds_data_client.execute_statement(
|
||||
database=GLOBAL_CONFIG["RELEASE_AWS_DB_NAME"],
|
||||
|
|
Loading…
Add table
Reference in a new issue