Skip to content

Commit

Permalink
Revert "Bump pytest from 5.4.3 to 7.0.1" (breaks lots of RLlib tests …
Browse files Browse the repository at this point in the history
…for unknown reasons) (ray-project#26517)
  • Loading branch information
sven1977 authored Jul 13, 2022
1 parent cc7115f commit ab10890
Show file tree
Hide file tree
Showing 23 changed files with 119 additions and 215 deletions.
3 changes: 1 addition & 2 deletions bazel/python.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)

Expand Down
4 changes: 2 additions & 2 deletions ci/build/test-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ci/env/install-minimal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ 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.
# TODO: make this dynamic
if [ "${TRAIN_MINIMAL_INSTALL-}" = 1 ]; then
python -m pip install -U "ray[tune]"
fi
fi
4 changes: 3 additions & 1 deletion cpp/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -324,5 +324,7 @@ py_test_module_list(
"small_size_python_tests",
"team:core",
],
deps = [],
deps = [
":ray_api",
],
)
17 changes: 0 additions & 17 deletions dashboard/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -26,31 +20,20 @@ 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"],
)

py_test(
name = "test_node",
size = "medium",
srcs = ["modules/node/tests/test_node.py"],
deps = [":conftest"],
tags = ["exclusive", "team:serve"],
)

py_test(
name = "test_dashboard",
size = "medium",
srcs = ["tests/test_dashboard.py"],
deps = [":conftest"],
tags = ["exclusive", "team:serve"],
)

Expand Down
5 changes: 0 additions & 5 deletions python/ray/autoscaler/aws/BUILD

This file was deleted.

5 changes: 0 additions & 5 deletions python/ray/autoscaler/azure/BUILD

This file was deleted.

5 changes: 0 additions & 5 deletions python/ray/autoscaler/gcp/BUILD

This file was deleted.

5 changes: 0 additions & 5 deletions python/ray/autoscaler/local/BUILD

This file was deleted.

16 changes: 9 additions & 7 deletions python/ray/data/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"],
)
9 changes: 0 additions & 9 deletions python/ray/experimental/packaging/example_pkg/BUILD

This file was deleted.

6 changes: 0 additions & 6 deletions python/ray/serve/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -318,7 +313,6 @@ py_test(
srcs = serve_tests_srcs,
tags = ["exclusive", "team:serve"],
deps = [":serve_lib"],
data = [":test_config_files"],
)

py_test(
Expand Down
Loading

0 comments on commit ab10890

Please sign in to comment.