Skip to content

Commit a543e2b

Browse files
authored
tooling: Use updated pytooling deps (envoyproxy#19660)
The pytooling packages have been updated to remove all non-async runners/checkers, and to refactor some of the code. This has reduced code complexity/paths/lines/tests etc. This PR updates envoy-side to use the newer async-only pytooling packages, and updates the envoy tooling to use async or newer code paths as required/appropriate In order to make this work i had to readd pytest-asyncio to the envoy deps, as the tests are again testing async fun. I also had to add nested-asyncio in order for the test runner to be able to start/stop test loops, inside the checkers loop. Signed-off-by: Ryan Northey <[email protected]>
1 parent d343d41 commit a543e2b

25 files changed

+270
-380
lines changed

.bazelignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
api
22
examples/grpc-bridge/script
33
tools/clang_tools
4+
tools/dev/src

pytest.ini

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
addopts = -raq --ignore=tools/testing/external/*,__init__.py,testing/conf --color=yes --cov-append -p tools.testing.plugin --cov-config=.coveragerc -Werror -vv tools
33
testpaths =
44
tests
5+
asyncio_mode = auto

tools/base/BUILD

-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
load("@rules_python//python:defs.bzl", "py_binary")
2-
load("@base_pip3//:requirements.bzl", "requirement")
31
load("//bazel:envoy_build_system.bzl", "envoy_package")
42

53
licenses(["notice"]) # Apache 2
@@ -9,13 +7,3 @@ envoy_package()
97
exports_files([
108
"entry_point.py",
119
])
12-
13-
py_binary(
14-
name = "bazel_query",
15-
srcs = ["bazel_query.py"],
16-
main = "bazel_query.py",
17-
deps = [
18-
"@envoy_repo",
19-
requirement("envoy.base.utils"),
20-
],
21-
)

tools/base/bazel_query.py

-63
This file was deleted.

tools/base/envoy_python.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
1+
load("@rules_python//python:defs.bzl", "py_binary")
22
load("@base_pip3//:requirements.bzl", base_entry_point = "entry_point")
33

44
def envoy_py_test(name, package, visibility, envoy_prefix = "@envoy"):

tools/base/requirements.in

+15-13
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
abstracts>=0.0.12
2-
aio.functional>=0.0.10
3-
aio.subprocess>=0.0.4
4-
aio.tasks>=0.0.5
2+
aio.api.bazel
3+
aio.core>=0.2.0
4+
aio.run.runner>=0.2.1
5+
aio.run.checker>=0.2.1
56
colorama
67
coloredlogs
78
coverage
8-
envoy.base.checker>=0.1.1
9-
envoy.base.runner>=0.1.0
10-
envoy.base.utils>=0.0.13
11-
envoy.code_format.python_check>=0.0.4
12-
envoy.dependency.cve_scan
13-
envoy.dependency.pip_check>=0.0.6
14-
envoy.distribution.release>=0.0.4
15-
envoy.distribution.verify>=0.0.6
16-
envoy.docs.sphinx-runner>=0.0.6
9+
envoy.base.utils>=0.0.14
10+
envoy.code_format.python_check>=0.0.7
11+
envoy.dependency.cve_scan>=0.0.4
12+
envoy.dependency.pip_check>=0.1.0
13+
envoy.distribution.release>=0.0.7
14+
envoy.distribution.repo>=0.0.5
15+
envoy.distribution.verify>=0.0.8
16+
envoy.docs.sphinx-runner>=0.0.8
1717
envoy.gpg.identity>=0.0.6
18-
envoy.gpg.sign>=0.0.7
18+
envoy.gpg.sign>=0.0.9
1919
flake8
2020
frozendict
2121
gitpython
2222
jinja2
23+
nest-asyncio
2324
pep8-naming
2425
ply
2526
pygithub
2627
pyreadline
2728
pytest
29+
pytest-asyncio
2830
pytest-cov
2931
pytest-patches
3032
pyyaml

0 commit comments

Comments
 (0)