From 6f14b6a9c33db11f243b580ed299598e186eaf3e Mon Sep 17 00:00:00 2001 From: Jiajun Yao Date: Mon, 16 May 2022 02:38:54 -0700 Subject: [PATCH] [Release Test] Add smoke_test field to release test report (#24749) Distinguish smoke test and normal test. --- release/ray_release/glue.py | 1 + release/ray_release/reporter/db.py | 1 + release/ray_release/result.py | 1 + release/ray_release/tests/test_glue.py | 12 ++++++++++++ 4 files changed, 15 insertions(+) diff --git a/release/ray_release/glue.py b/release/ray_release/glue.py index e855b358f714..44c41150c3f3 100644 --- a/release/ray_release/glue.py +++ b/release/ray_release/glue.py @@ -90,6 +90,7 @@ def run_release_test( result.wheels_url = ray_wheels_url result.stable = test.get("stable", True) + result.smoke_test = smoke_test buildkite_url = os.getenv("BUILDKITE_BUILD_URL", "") if buildkite_url: diff --git a/release/ray_release/reporter/db.py b/release/ray_release/reporter/db.py index 985bc497ce9e..d9ad556654fc 100644 --- a/release/ray_release/reporter/db.py +++ b/release/ray_release/reporter/db.py @@ -31,6 +31,7 @@ def report_result(self, test: Test, result: Result): "runtime": result.runtime or -1.0, "stable": result.stable, "return_code": result.return_code, + "smoke_test": result.smoke_test, } logger.debug(f"Result json: {json.dumps(result_json)}") diff --git a/release/ray_release/result.py b/release/ray_release/result.py index 14a0ae612e39..3825a4424c71 100644 --- a/release/ray_release/result.py +++ b/release/ray_release/result.py @@ -13,6 +13,7 @@ class Result: runtime: Optional[float] = None stable: bool = True + smoke_test: bool = False buildkite_url: Optional[str] = None wheels_url: Optional[str] = None diff --git a/release/ray_release/tests/test_glue.py b/release/ray_release/tests/test_glue.py index d89612bbdc6f..2e38b0ae07b0 100644 --- a/release/ray_release/tests/test_glue.py +++ b/release/ray_release/tests/test_glue.py @@ -522,6 +522,18 @@ def testTestCommandTimeoutLongRunning(self): # Ensure cluster was terminated self.assertGreaterEqual(self.sdk.call_counter["terminate_cluster"], 1) + def testSmokeUnstableTest(self): + result = Result() + + self._succeed_until("complete") + + self.test["stable"] = False + self._run(result, smoke_test=True) + + # Ensure stable and smoke_test are set correctly. + assert not result.stable + assert result.smoke_test + def testFetchResultFails(self): result = Result()