Our first successful `python_test` run via Docker!...
# development
h
Our first successful
python_test
run via Docker!!
Copy code
āÆ ./pants test src/python/pants/util/strutil_test.py --no-python-infer-conftests
15:59:29.45 [INFO] Completed: Building 1 requirement for requirements.pex from the 3rdparty/python/user_reqs.lock resolve: pytest<7.1.0,>=6.2.4
15:59:36.38 [INFO] Completed: Building pytest_runner.pex
15:59:38.55 [INFO] Completed: Run Pytest - src/python/pants/util/strutil_test.py:tests succeeded.

āœ“ src/python/pants/util/strutil_test.py:tests succeeded in 2.15s.
šŸŽŠ 3
šŸ”„ 4
Apply this diff on
main
, and make sure Docker is running:
Copy code
diff --git a/src/python/pants/util/BUILD b/src/python/pants/util/BUILD
index 76d0a50a8a..eb3d2c21cf 100644
--- a/src/python/pants/util/BUILD
+++ b/src/python/pants/util/BUILD
@@ -3,4 +3,4 @@
 
 python_sources()
 
-python_tests(name="tests")
+python_tests(name="tests", _environment="docker")
@bitter-ability-32190 the
--no-python-infer-conftests
is necessary because our
conftest.py
uses
target.py
, which transitively uses
native_engine
. That is a
resource
that blindly gets copied into the Docker sandbox: it's not platform aware. So, when run on Docker from macOS, we end up with
invalid ELF header
To facilitate us working on this project, thoughts on me rewriting the
conftest.py
check for badly named Fields to instead be a Flake8 first-party plugin? Or any other suggestions?
šŸ‘€ 1
b
I avoided flake8 because the facilities to do this are weak. If you wanna tackle it be my guest šŸ˜› Otherwise I'm confident we could find a way to adjust conftest
šŸ‘ 1
w
Very exciting! Nice work @fast-nail-55400, @hundreds-father-404, @ancient-vegetable-10556.
ā¤ļø 1
h
and you too with the graph changes!