mirror of
https://github.com/vale981/ray
synced 2025-03-05 10:01:43 -05:00
Revert "Bump pytest from 5.4.3 to 7.0.1" (breaks lots of RLlib tests for unknown reasons) (#26517)
This commit is contained in:
parent
cc7115f6a2
commit
ab10890e90
23 changed files with 118 additions and 214 deletions
|
@ -3,7 +3,7 @@ load("@bazel_skylib//lib:paths.bzl", "paths")
|
|||
# py_test_module_list creates a py_test target for each
|
||||
# Python file in `files`
|
||||
|
||||
def py_test_module_list(files, size, deps, extra_srcs=[], name_suffix="", **kwargs):
|
||||
def py_test_module_list(files, size, deps, extra_srcs, name_suffix="", **kwargs):
|
||||
for file in files:
|
||||
# remove .py
|
||||
name = paths.split_extension(file)[0] + name_suffix
|
||||
|
@ -14,7 +14,6 @@ def py_test_module_list(files, size, deps, extra_srcs=[], name_suffix="", **kwar
|
|||
size = size,
|
||||
main = file,
|
||||
srcs = extra_srcs + [file],
|
||||
deps = deps,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ if [[ "$platform" == "linux" ]]; then
|
|||
"$PYTHON_EXE" -u -c "import ray; print(ray.__commit__)" | grep "$TRAVIS_COMMIT" || (echo "ray.__commit__ not set properly!" && exit 1)
|
||||
|
||||
# Install the dependencies to run the tests.
|
||||
"$PIP_CMD" install -q aiohttp aiosignal frozenlist grpcio 'pytest==7.0.1' requests proxy.py
|
||||
"$PIP_CMD" install -q aiohttp aiosignal frozenlist grpcio pytest==5.4.3 requests proxy.py
|
||||
|
||||
# Run a simple test script to make sure that the wheel works.
|
||||
for SCRIPT in "${TEST_SCRIPTS[@]}"; do
|
||||
|
@ -117,7 +117,7 @@ elif [[ "$platform" == "macosx" ]]; then
|
|||
"$PIP_CMD" install -q "$PYTHON_WHEEL"
|
||||
|
||||
# Install the dependencies to run the tests.
|
||||
"$PIP_CMD" install -q aiohttp aiosignal frozenlist grpcio 'pytest==7.0.1' requests proxy.py
|
||||
"$PIP_CMD" install -q aiohttp aiosignal frozenlist grpcio pytest==5.4.3 requests proxy.py
|
||||
|
||||
# Run a simple test script to make sure that the wheel works.
|
||||
for SCRIPT in "${TEST_SCRIPTS[@]}"; do
|
||||
|
|
2
ci/env/install-minimal.sh
vendored
2
ci/env/install-minimal.sh
vendored
|
@ -33,7 +33,7 @@ eval "${WORKSPACE_DIR}/ci/ci.sh build"
|
|||
|
||||
# Install test requirements
|
||||
python -m pip install -U \
|
||||
pytest==7.0.1 \
|
||||
pytest==5.4.3 \
|
||||
numpy
|
||||
|
||||
# Train requirements.
|
||||
|
|
|
@ -324,5 +324,7 @@ py_test_module_list(
|
|||
"small_size_python_tests",
|
||||
"team:core",
|
||||
],
|
||||
deps = [],
|
||||
deps = [
|
||||
":ray_api",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -10,12 +10,6 @@ py_library(
|
|||
),
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "conftest",
|
||||
srcs = ["tests/conftest.py"],
|
||||
deps = ["//python/ray/tests:conftest"],
|
||||
)
|
||||
|
||||
py_test_run_all_subdirectory(
|
||||
size = "medium",
|
||||
include = ["**/test*.py"],
|
||||
|
@ -26,15 +20,6 @@ py_test_run_all_subdirectory(
|
|||
"tests/test_state_head.py"
|
||||
],
|
||||
extra_srcs = [],
|
||||
data = [
|
||||
"modules/job/tests/backwards_compatibility_scripts/test_backwards_compatibility.sh",
|
||||
"modules/job/tests/pip_install_test-0.5-py3-none-any.whl",
|
||||
"modules/snapshot/snapshot_schema.json",
|
||||
"modules/tests/test_config_files/basic_runtime_env.yaml",
|
||||
] + glob([
|
||||
"modules/job/tests/subprocess_driver_scripts/*.py",
|
||||
]),
|
||||
deps = [":conftest"],
|
||||
tags = ["exclusive", "team:serve"],
|
||||
)
|
||||
|
||||
|
@ -42,7 +27,6 @@ py_test(
|
|||
name = "test_node",
|
||||
size = "medium",
|
||||
srcs = ["modules/node/tests/test_node.py"],
|
||||
deps = [":conftest"],
|
||||
tags = ["exclusive", "team:serve"],
|
||||
)
|
||||
|
||||
|
@ -50,7 +34,6 @@ py_test(
|
|||
name = "test_dashboard",
|
||||
size = "medium",
|
||||
srcs = ["tests/test_dashboard.py"],
|
||||
deps = [":conftest"],
|
||||
tags = ["exclusive", "team:serve"],
|
||||
)
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
filegroup(
|
||||
name = "example",
|
||||
data = glob(["example-*.yaml"]),
|
||||
visibility = ["//python/ray/tests:__pkg__"],
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
filegroup(
|
||||
name = "example",
|
||||
data = glob(["example-*.yaml"]),
|
||||
visibility = ["//python/ray/tests:__pkg__"],
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
filegroup(
|
||||
name = "example",
|
||||
data = glob(["example-*.yaml"]),
|
||||
visibility = ["//python/ray/tests:__pkg__"],
|
||||
)
|
|
@ -1,5 +0,0 @@
|
|||
filegroup(
|
||||
name = "example",
|
||||
data = glob(["example-*.yaml"]),
|
||||
visibility = ["//python/ray/tests:__pkg__"],
|
||||
)
|
|
@ -5,18 +5,19 @@
|
|||
# --------------------------------------------------------------------
|
||||
load("//bazel:python.bzl", "py_test_module_list")
|
||||
|
||||
py_library(
|
||||
name = "conftest",
|
||||
srcs = ["tests/conftest.py"],
|
||||
deps = ["//python/ray/tests:conftest"],
|
||||
)
|
||||
SRCS = [] + select({
|
||||
"@bazel_tools//src/conditions:windows": glob([
|
||||
"**/conftest.py",
|
||||
]),
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
py_test(
|
||||
name = "test_preprocessors",
|
||||
size = "small",
|
||||
srcs = ["tests/test_preprocessors.py"],
|
||||
tags = ["team:ml", "exclusive", "ray_air"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -25,6 +26,7 @@ py_test_module_list(
|
|||
exclude=["tests/test_preprocessors.py"]
|
||||
),
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["team:core", "exclusive"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
filegroup(
|
||||
name = "example_pkg",
|
||||
data = [
|
||||
"ray_pkg.yaml",
|
||||
] + glob([
|
||||
"my_pkg/**/*.py",
|
||||
]),
|
||||
visibility = ["//python/ray/tests:__pkg__"],
|
||||
)
|
|
@ -12,11 +12,6 @@ py_library(
|
|||
|
||||
serve_tests_srcs = glob(["tests/**/*.py"])
|
||||
|
||||
filegroup(
|
||||
name = "test_config_files",
|
||||
data = glob(["tests/test_config_files/**/*"]),
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_api",
|
||||
size = "medium",
|
||||
|
@ -318,7 +313,6 @@ py_test(
|
|||
srcs = serve_tests_srcs,
|
||||
tags = ["exclusive", "team:serve"],
|
||||
deps = [":serve_lib"],
|
||||
data = [":test_config_files"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
|
|
|
@ -1,31 +1,23 @@
|
|||
load("//bazel:python.bzl", "py_test_module_list")
|
||||
|
||||
py_library(
|
||||
name = "conftest",
|
||||
srcs = glob(["**/conftest.py"]),
|
||||
visibility = [
|
||||
"//python/ray/tests:__subpackages__",
|
||||
"//python/ray/dashboard:__pkg__",
|
||||
"//python/ray/data:__pkg__",
|
||||
],
|
||||
)
|
||||
SRCS = [] + select({
|
||||
"@bazel_tools//src/conditions:windows": glob([
|
||||
# TODO(mehrdadn): This should be added for all platforms once resulting errors are fixed
|
||||
"**/conftest.py",
|
||||
]),
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
py_test_module_list(
|
||||
files = [
|
||||
"test_dashboard.py",
|
||||
"test_ray_cluster_with_external_redis.py",
|
||||
"test_k8s_cluster_launcher.py",
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "manual", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_k8s_cluster_launcher",
|
||||
srcs = ["test_k8s_cluster_launcher.py"],
|
||||
tags = ["exclusive", "manual", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
data = ["test_cli_patterns/test_k8s_cluster_launcher.yaml"]
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -63,6 +55,7 @@ py_test_module_list(
|
|||
"test_grpc_client_credentials.py",
|
||||
"test_iter.py",
|
||||
"test_job.py",
|
||||
"test_joblib.py",
|
||||
"test_get_locations.py",
|
||||
"test_global_state.py",
|
||||
"test_healthcheck.py",
|
||||
|
@ -71,17 +64,9 @@ py_test_module_list(
|
|||
"test_protobuf_compatibility.py"
|
||||
],
|
||||
size = "medium",
|
||||
tags = ["exclusive", "client_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_joblib",
|
||||
srcs = ["test_joblib.py"],
|
||||
data = ["mnist_784_100_samples.pkl"],
|
||||
size = "medium",
|
||||
tags = ["exclusive", "client_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "medium_size_python_tests_a_to_j", "team:core"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -90,8 +75,9 @@ py_test_module_list(
|
|||
"test_client_reconnect.py",
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "client_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -106,8 +92,9 @@ py_test_module_list(
|
|||
"test_client_library_integration.py",
|
||||
],
|
||||
size = "medium",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "client_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -157,8 +144,9 @@ py_test_module_list(
|
|||
"test_traceback.py",
|
||||
],
|
||||
size = "medium",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "medium_size_python_tests_k_to_z", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -191,8 +179,9 @@ py_test_module_list(
|
|||
"test_get_or_create_actor.py",
|
||||
],
|
||||
size = "small",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "small_size_python_tests", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -200,8 +189,9 @@ py_test_module_list(
|
|||
"test_gcs_ha_e2e.py",
|
||||
],
|
||||
size = "small",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "ray_ha", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
|
||||
|
@ -210,6 +200,7 @@ py_test_module_list(
|
|||
"test_autoscaler.py",
|
||||
"test_autoscaler_drain_node_api.py",
|
||||
"test_autoscaler_gcp.py",
|
||||
"test_autoscaler_yaml.py",
|
||||
"test_cli_logger.py",
|
||||
"test_client_metadata.py",
|
||||
"test_client_terminate.py",
|
||||
|
@ -221,26 +212,9 @@ py_test_module_list(
|
|||
"kuberay/test_autoscaling_config.py"
|
||||
],
|
||||
size = "small",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_autoscaler_yaml",
|
||||
size = "small",
|
||||
srcs = ["test_autoscaler_yaml.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
data = [
|
||||
"additional_property.yaml",
|
||||
"test_cli_patterns/test_multi_node.yaml",
|
||||
"test_cli_patterns/test_no_head.yaml",
|
||||
"test_cli_patterns/test_no_workers.yaml",
|
||||
"//python/ray/autoscaler/aws:example",
|
||||
"//python/ray/autoscaler/azure:example",
|
||||
"//python/ray/autoscaler/gcp:example",
|
||||
"//python/ray/autoscaler/local:example",
|
||||
],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -248,13 +222,15 @@ py_test_module_list(
|
|||
"test_dataclient_disconnect.py",
|
||||
],
|
||||
size = "medium",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "medium_size_python_tests_a_to_j", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
files = [
|
||||
"test_actor.py",
|
||||
"test_cli.py",
|
||||
"test_failure.py",
|
||||
"test_actor_advanced.py",
|
||||
"test_threaded_actor.py",
|
||||
|
@ -268,17 +244,9 @@ py_test_module_list(
|
|||
"test_exit_observability.py",
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "large_size_python_tests_shard_0", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_cli",
|
||||
srcs = ["test_cli.py"],
|
||||
data = glob(["test_cli_patterns/*.txt", "test_cli_patterns/*.yaml"]),
|
||||
size = "large",
|
||||
tags = ["exclusive", "large_size_python_tests_shard_0", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -297,8 +265,9 @@ py_test_module_list(
|
|||
"test_multi_node_3.py",
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "large_size_python_tests_shard_1", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -311,9 +280,9 @@ py_test_module_list(
|
|||
"test_runtime_env_working_dir_remote_uri.py"
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "large_size_python_tests_shard_2", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
data = ["pip_install_test-0.5-py3-none-any.whl"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -323,27 +292,20 @@ py_test_module_list(
|
|||
"test_runtime_env_conda_and_pip_3.py",
|
||||
"test_runtime_env_conda_and_pip_4.py",
|
||||
"test_runtime_env_conda_and_pip_5.py",
|
||||
"test_runtime_env_complicated.py"
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "post_wheel_build", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_runtime_env_complicated",
|
||||
size = "large",
|
||||
srcs = ["test_runtime_env_complicated.py"],
|
||||
tags = ["exclusive", "post_wheel_build", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
data = ["//python/ray/experimental/packaging/example_pkg"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_actor_group",
|
||||
size = "medium",
|
||||
srcs = ["test_actor_group.py"],
|
||||
srcs = SRCS + ["test_actor_group.py"],
|
||||
tags = ["exclusive", "medium_size_python_tests_a_to_j", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"]
|
||||
deps = ["//:ray_lib"]
|
||||
)
|
||||
|
||||
# TODO(barakmich): aws/ might want its own buildfile, or
|
||||
|
@ -351,25 +313,25 @@ py_test(
|
|||
py_test(
|
||||
name = "test_autoscaler_aws",
|
||||
size = "small",
|
||||
srcs = ["aws/test_autoscaler_aws.py"],
|
||||
srcs = SRCS + ["aws/test_autoscaler_aws.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_aws_batch_tag_update",
|
||||
size = "small",
|
||||
srcs = ["aws/test_aws_batch_tag_update.py"],
|
||||
srcs = SRCS + ["aws/test_aws_batch_tag_update.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_gcp_node_provider",
|
||||
size = "small",
|
||||
srcs = ["gcp/test_gcp_node_provider.py"],
|
||||
srcs = SRCS + ["gcp/test_gcp_node_provider.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
# Note(simon): typing tests are not included in module list
|
||||
|
@ -377,59 +339,59 @@ py_test(
|
|||
py_test(
|
||||
name = "test_typing",
|
||||
size = "medium",
|
||||
srcs = ["test_typing.py", "typing_files/check_typing_bad.py",
|
||||
srcs = SRCS + ["test_typing.py", "typing_files/check_typing_bad.py",
|
||||
"typing_files/check_typing_good.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
# TODO: use py_test(env = ...) in the build file with bazel 4.0
|
||||
py_test(
|
||||
name = "test_tracing",
|
||||
size = "medium",
|
||||
srcs = ["test_tracing.py"],
|
||||
srcs = SRCS + ["test_tracing.py"],
|
||||
tags = ["exclusive", "medium_size_python_tests_k_to_z", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"]
|
||||
deps = ["//:ray_lib"]
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_pydantic_serialization",
|
||||
size = "small",
|
||||
srcs = ["test_pydantic_serialization.py", "pydantic_module.py"],
|
||||
srcs = SRCS + ["test_pydantic_serialization.py", "pydantic_module.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_runtime_env_validation",
|
||||
size = "small",
|
||||
srcs = ["test_runtime_env_validation.py"],
|
||||
srcs = SRCS + ["test_runtime_env_validation.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_runtime_env_ray_minimal",
|
||||
size = "medium",
|
||||
srcs = ["test_runtime_env_ray_minimal.py"],
|
||||
srcs = SRCS + ["test_runtime_env_ray_minimal.py"],
|
||||
tags = ["exclusive", "medium_size_python_tests_k_to_z", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_serve_ray_minimal",
|
||||
size = "small",
|
||||
srcs = ["test_serve_ray_minimal.py"],
|
||||
srcs = SRCS + ["test_serve_ray_minimal.py"],
|
||||
tags = ["exclusive", "small_size_python_tests", "team:serve"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "kuberay/test_autoscaling_e2e",
|
||||
size = "large",
|
||||
srcs = ["kuberay/test_autoscaling_e2e.py"],
|
||||
srcs = SRCS + ["kuberay/test_autoscaling_e2e.py"],
|
||||
tags = ["exclusive", "kuberay_operator", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
# TODO(ekl) we can't currently support tagging these as flaky since there's
|
||||
|
@ -451,10 +413,11 @@ py_test_module_list(
|
|||
"test_list_actors_4.py",
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
name_suffix = "_client_mode",
|
||||
env = {"RAY_CLIENT_MODE": "1", "RAY_PROFILING": "1"},
|
||||
tags = ["exclusive", "client_tests", "team:serverless"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -462,6 +425,7 @@ py_test_module_list(
|
|||
"test_actor_in_container.py",
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
tags = ["exclusive", "worker-container", "team:serve"],
|
||||
# Now we run this test in a container which has installed ray
|
||||
deps = [],
|
||||
|
@ -477,9 +441,10 @@ py_test_module_list(
|
|||
"test_array.py"
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
name_suffix = "_debug_mode",
|
||||
tags = ["exclusive", "debug_tests", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
||||
py_test_module_list(
|
||||
|
@ -492,7 +457,8 @@ py_test_module_list(
|
|||
"test_array.py"
|
||||
],
|
||||
size = "large",
|
||||
extra_srcs = SRCS,
|
||||
name_suffix = "_asan",
|
||||
tags = ["exclusive", "asan_tests", "team:core"],
|
||||
deps = ["//:ray_lib", ":conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
)
|
||||
|
|
|
@ -2,6 +2,6 @@ py_test(
|
|||
name = "test_modin",
|
||||
size = "large",
|
||||
srcs = ["test_modin.py"],
|
||||
deps = ["//:ray_lib", "//python/ray/tests:conftest"],
|
||||
deps = ["//:ray_lib"],
|
||||
tags = ["team:core", "exclusive"],
|
||||
)
|
||||
|
|
|
@ -93,7 +93,7 @@ class AutoscalingConfigTest(unittest.TestCase):
|
|||
def testValidateDefaultConfig(self):
|
||||
for config_path in CONFIG_PATHS:
|
||||
try:
|
||||
if os.path.join("aws", "example-multi-node-type.yaml") in config_path:
|
||||
if "aws/example-multi-node-type.yaml" in config_path:
|
||||
# aws tested in testValidateDefaultConfigAWSMultiNodeTypes.
|
||||
continue
|
||||
if "local" in config_path:
|
||||
|
|
|
@ -19,7 +19,6 @@ Note: config cache does not work with AWS mocks since the AWS resource ids are
|
|||
"""
|
||||
import glob
|
||||
import multiprocessing as mp
|
||||
import multiprocessing.connection
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
@ -116,9 +115,7 @@ def _unlink_test_ssh_key():
|
|||
pass
|
||||
|
||||
|
||||
def _start_ray_and_block(
|
||||
runner, child_conn: multiprocessing.connection.Connection, as_head: bool
|
||||
):
|
||||
def _start_ray_and_block(runner, child_conn: mp.connection.Connection, as_head: bool):
|
||||
"""Utility function to start a CLI command with `ray start --block`
|
||||
|
||||
This function is expected to be run in another process, where `child_conn` is used
|
||||
|
|
|
@ -315,10 +315,7 @@ RuntimeError: Failed to unpickle serialized exception"""
|
|||
try:
|
||||
ray.get(f.remote())
|
||||
except Exception as ex:
|
||||
python310_extra_exc_msg = "test_unpickleable_stacktrace.<locals>.NoPickleError."
|
||||
assert clean_noqa(expected_output) == scrub_traceback(str(ex)).replace(
|
||||
f"TypeError: {python310_extra_exc_msg}", "TypeError: "
|
||||
)
|
||||
assert clean_noqa(expected_output) == scrub_traceback(str(ex))
|
||||
|
||||
|
||||
def test_serialization_error_message(shutdown_only):
|
||||
|
@ -354,30 +351,29 @@ def test_serialization_error_message(shutdown_only):
|
|||
task_with_unserializable_arg.remote(lock)
|
||||
|
||||
def scrub_traceback(ex):
|
||||
ex = re.sub("object at .*> for a", "object at ADDRESS> for a", ex)
|
||||
ex = re.sub(
|
||||
r"com_github_ray_project_ray\.python\.ray\.tests\.test_traceback",
|
||||
"test_traceback",
|
||||
ex,
|
||||
)
|
||||
ex = re.sub(r"python\.ray\.tests\.test_traceback", "test_traceback", ex)
|
||||
return ex
|
||||
return re.sub("object at .*> for a", "object at ADDRESS> for a", ex)
|
||||
|
||||
assert clean_noqa(expected_output_task) == scrub_traceback(str(excinfo.value))
|
||||
test_prefix = "com_github_ray_project_ray.python.ray.tests."
|
||||
|
||||
assert clean_noqa(expected_output_task) == scrub_traceback(
|
||||
str(excinfo.value)
|
||||
).replace(test_prefix, "")
|
||||
"""
|
||||
Test an actor with an unserializable object.
|
||||
"""
|
||||
with pytest.raises(TypeError) as excinfo:
|
||||
a = A.remote(lock)
|
||||
print(a)
|
||||
assert clean_noqa(expected_output_actor) == scrub_traceback(str(excinfo.value))
|
||||
assert clean_noqa(expected_output_actor) == scrub_traceback(
|
||||
str(excinfo.value)
|
||||
).replace(test_prefix, "")
|
||||
"""
|
||||
Test the case where an unserializable object is captured by tasks.
|
||||
"""
|
||||
with pytest.raises(TypeError) as excinfo:
|
||||
capture_lock.remote()
|
||||
assert clean_noqa(expected_capture_output_task) == scrub_traceback(
|
||||
str(excinfo.value)
|
||||
assert clean_noqa(expected_capture_output_task) == str(excinfo.value).replace(
|
||||
test_prefix, ""
|
||||
)
|
||||
"""
|
||||
Test the case where an unserializable object is captured by actors.
|
||||
|
@ -385,8 +381,8 @@ def test_serialization_error_message(shutdown_only):
|
|||
with pytest.raises(TypeError) as excinfo:
|
||||
b = B.remote()
|
||||
print(b)
|
||||
assert clean_noqa(expected_capture_output_actor) == scrub_traceback(
|
||||
str(excinfo.value)
|
||||
assert clean_noqa(expected_capture_output_actor) == str(excinfo.value).replace(
|
||||
test_prefix, ""
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -77,12 +77,9 @@ def get_span_list():
|
|||
|
||||
def get_span_dict(span_list):
|
||||
"""Given a list of span names, return dictionary of span names."""
|
||||
strip_prefix = "python.ray.tests."
|
||||
span_names = {}
|
||||
for span in span_list:
|
||||
span_name = span["name"]
|
||||
if span_name.startswith(strip_prefix):
|
||||
span_name = span_name[len(strip_prefix) :]
|
||||
if span_name in span_names:
|
||||
span_names[span_name] += 1
|
||||
else:
|
||||
|
@ -106,7 +103,7 @@ def task_helper():
|
|||
# The spans could show up in a different order, so just check that
|
||||
# all spans are as expected
|
||||
span_names = get_span_dict(span_list)
|
||||
assert span_names == {
|
||||
return span_names == {
|
||||
"test_tracing.f ray.remote": 1,
|
||||
"test_tracing.f ray.remote_worker": 1,
|
||||
}
|
||||
|
@ -174,11 +171,11 @@ def async_actor_helper():
|
|||
|
||||
|
||||
def test_tracing_task_init_workflow(cleanup_dirs, ray_start_init_tracing):
|
||||
task_helper()
|
||||
assert task_helper()
|
||||
|
||||
|
||||
def test_tracing_task_start_workflow(cleanup_dirs, ray_start_cli_tracing):
|
||||
task_helper()
|
||||
assert task_helper()
|
||||
|
||||
|
||||
def test_tracing_sync_actor_init_workflow(cleanup_dirs, ray_start_init_tracing):
|
||||
|
|
|
@ -68,7 +68,6 @@ py_test(
|
|||
name = "test_cluster_searcher",
|
||||
size = "large",
|
||||
srcs = ["tests/test_cluster_searcher.py"],
|
||||
data = ["tests/_test_cluster_interrupt_searcher.py"],
|
||||
deps = [":tune_lib"],
|
||||
tags = ["team:ml", "exclusive", "tests_dir_C"],
|
||||
)
|
||||
|
|
|
@ -5,7 +5,13 @@
|
|||
# --------------------------------------------------------------------
|
||||
load("//bazel:python.bzl", "py_test_module_list")
|
||||
|
||||
SRCS = glob(["**/conftest.py"])
|
||||
SRCS = [] + select({
|
||||
"@bazel_tools//src/conditions:windows": glob([
|
||||
# TODO(mehrdadn): This should be added for all platforms once resulting errors are fixed
|
||||
"**/conftest.py",
|
||||
]),
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
LARGE_TESTS = ["tests/test_recovery.py", "tests/test_basic_workflows_2.py", "tests/test_metadata.py"]
|
||||
|
||||
|
|
|
@ -304,8 +304,7 @@ def test_get_named_step_default(workflow_start_regular, tmp_path):
|
|||
assert math.factorial(5) == workflow.run(factorial.bind(5), workflow_id="factorial")
|
||||
for i in range(5):
|
||||
step_name = (
|
||||
"python.ray.workflow.tests.test_basic_workflows_2."
|
||||
"test_get_named_step_default.locals.factorial"
|
||||
"test_basic_workflows_2.test_get_named_step_default.locals.factorial"
|
||||
)
|
||||
if i != 0:
|
||||
step_name += "_" + str(i)
|
||||
|
|
|
@ -78,7 +78,7 @@ pexpect
|
|||
Pillow; platform_system != "Windows"
|
||||
pygments
|
||||
pyspark==3.1.2
|
||||
pytest==7.0.1
|
||||
pytest==5.4.3
|
||||
pytest-asyncio==0.16.0
|
||||
pytest-rerunfailures
|
||||
pytest-sugar
|
||||
|
|
|
@ -207,8 +207,7 @@ py_test(
|
|||
name = "test_config",
|
||||
tags = ["team:ci", "release_unit"],
|
||||
size = "small",
|
||||
srcs = ["ray_release/tests/test_config.py"],
|
||||
data = ["release_tests.yaml"],
|
||||
srcs = ["ray_release/tests/test_config.py"]
|
||||
)
|
||||
|
||||
py_test(
|
||||
|
@ -229,18 +228,12 @@ py_test(
|
|||
name = "test_run_script",
|
||||
tags = ["team:ci", "release_unit"],
|
||||
size = "small",
|
||||
srcs = ["ray_release/tests/test_run_script.py"],
|
||||
data = [
|
||||
"run_release_test.sh",
|
||||
"ray_release/tests/_test_catch_args.py",
|
||||
"ray_release/tests/_test_run_release_test_sh.py",
|
||||
],
|
||||
srcs = ["ray_release/tests/test_run_script.py"]
|
||||
)
|
||||
|
||||
py_test(
|
||||
name = "test_wheels",
|
||||
tags = ["team:ci", "release_unit"],
|
||||
size = "small",
|
||||
srcs = ["ray_release/tests/test_wheels.py"],
|
||||
deps = ["//:ray_lib"],
|
||||
srcs = ["ray_release/tests/test_wheels.py"]
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue