mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

Adds a unit-tested and restructured ray_release package for running release tests. Relevant changes in behavior: Per default, Buildkite will wait for the wheels of the current commit to be available. Alternatively, users can a) specify a different commit hash, b) a wheels URL (which we will also wait for to be available) or c) specify a branch (or user/branch combination), in which case the latest available wheels will be used (e.g. if master is passed, behavior matches old default behavior). The main subpackages are: Cluster manager: Creates cluster envs/computes, starts cluster, terminates cluster Command runner: Runs commands, e.g. as client command or sdk command File manager: Uploads/downloads files to/from session Reporter: Reports results (e.g. to database) Much of the code base is unit tested, but there are probably some pieces missing. Example build (waited for wheels to be built): https://buildkite.com/ray-project/kf-dev/builds/51#_ Wheel build: https://buildkite.com/ray-project/ray-builders-branch/builds/6023
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
from ray_release.config import Test
|
|
from ray_release.logger import logger
|
|
from ray_release.reporter.reporter import Reporter
|
|
from ray_release.result import Result
|
|
from ray_release.util import format_link
|
|
|
|
|
|
class LogReporter(Reporter):
|
|
def report_result(self, test: Test, result: Result):
|
|
logger.info(
|
|
f"Test {test['name']} finished after "
|
|
f"{result.runtime:.2f} seconds. Last logs:\n\n"
|
|
f"{result.last_logs}\n"
|
|
)
|
|
|
|
logger.info(
|
|
f"Got the following metadata: \n"
|
|
f" name: {test['name']}\n"
|
|
f" status: {result.status}\n"
|
|
f" runtime: {result.runtime:.2f}\n"
|
|
f" stable: {result.stable}\n"
|
|
f"\n"
|
|
f" buildkite_url: {format_link(result.buildkite_url)}\n"
|
|
f" wheels_url: {format_link(result.wheels_url)}\n"
|
|
f" cluster_url: {format_link(result.cluster_url)}\n"
|
|
)
|
|
|
|
results = result.results
|
|
if results:
|
|
msg = "Observed the following results:\n\n"
|
|
|
|
for key, val in results.items():
|
|
msg += f" {key} = {val}\n"
|
|
else:
|
|
msg = "Did not find any results."
|
|
logger.info(msg)
|