Hi, I facing an unusual issue. Looking for some fe...
# general
m
Hi, I facing an unusual issue. Looking for some feedback. I have working branch with all the test cases running. I had added
--no-binary=protobuf
in my requirements.txt file to resolve this issue. But unfortunately, after adding this, I am not able to decode some of my protobuf objects at runtime, and hence I am removing this part. But after removing one of my test case doesn’t run at all. It keeps showing something like:
Copy code
[INFO] Long running tasks:
             Run Pytest for src/backend/unit_test.py:tests
So, looking at some help in debugging this, as the new commit has no other change except removal and --no-binary=protobuf and subsequent change in pytest_lockfile.txt after running
./pants generate-lockfiles --resolve=pytest
.
1
b
For debugging slow tests, I've had good success with: 1. looking at the test running live via
--debug
(https://www.pantsbuild.org/docs/reference-test#debug) 2. passing extra args to pytest, e.g.
-vv
to see the tests as they run (https://www.pantsbuild.org/docs/python-test-goal#passing-arguments-to-pytest) For example,
./pants test --debug src/backend/unit_test.py -- -vv
will show more output from pytest, as that file is running, which might reveal what's making it slow.
m
Thanks @broad-processor-92400 for the suggestions. After running in debug mode, it shows below information.
And another interesting bit is that this is happening only on gitlab runner(CI), and the test is working fine on local and buildbarn.
It looks like the specific test finally passed, but the pipeline is still not finishing. It’s still try to run something even though there is nothing else in pipeline to run.
I think I found the issue. It was related to a difference between extra_requirements in pants.toml and pants.ci.toml