Skip to content

Commit

Permalink
[release] update if xgboost test suite require result or not.
Browse files Browse the repository at this point in the history
Signed-off-by: xwjiang2010 <xwjiang2010@gmail.com>
  • Loading branch information
xwjiang2010 committed Feb 8, 2023
1 parent 22bc1e9 commit 03ca1c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions release/ray_release/alerts/handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@
),
"rllib_tests": (rllib_tests.handle_result, False),
"tune_tests": (tune_tests.handle_result, True),
"xgboost_tests": (xgboost_tests.handle_result, True),
"xgboost_tests": (xgboost_tests.handle_result, xgboost_tests.require_result),
}


def require_result(test: Test) -> bool:
alert_suite = test.get("alert", "default")
if alert_suite not in result_to_handle_map:
raise ReleaseTestConfigError(f"Alert suite {alert_suite} not found.")
return result_to_handle_map[alert_suite][1]
require_result = result_to_handle_map[alert_suite][1]
if callable(require_result):
require_result = require_result(test)
assert isinstance(require_result, bool)
return require_result


def handle_result(test: Test, result: Result):
Expand Down
5 changes: 5 additions & 0 deletions release/ray_release/alerts/xgboost_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
from ray_release.result import Result


def require_result(test: Test):
test_name = test["legacy"]["test_name"]
return test_name not in ["distributed_api_test", "ft_small_elastic", "ft_small_nonelastic"]


def handle_result(
test: Test,
result: Result,
Expand Down

0 comments on commit 03ca1c0

Please sign in to comment.