Hi, why is pants starting and cancelling stuff. I ...
# general
r
Hi, why is pants starting and cancelling stuff. I only see this on our CI platform (aws codebuild), not locally though
Copy code
[Container] 2022/04/08 14:08:25 Running command ./pants test ::
14:08:26.77 [INFO] Starting: Building pytest.pex from pytest_default_lockfile.txt
14:08:26.78 [INFO] Starting: Building requirements.pex
14:08:26.82 [INFO] Canceled: Building pytest.pex from pytest_default_lockfile.txt
14:08:26.82 [INFO] Starting: Building pytest.pex from pytest_default_lockfile.txt
14:08:26.87 [INFO] Canceled: Building pytest.pex from pytest_default_lockfile.txt
14:08:26.87 [INFO] Starting: Building pytest.pex from pytest_default_lockfile.txt
14:08:26.93 [INFO] Canceled: Building pytest.pex from pytest_default_lockfile.txt
14:08:26.93 [INFO] Starting: Building pytest.pex from pytest_default_lockfile.txt
at the end it is able to run tests successfully though.
there is no caching enabled
Similar behavior with
lint
Copy code
[Container] 2022/04/08 14:16:42 Running command ./pants fmt ::

14:16:51.07 [INFO] Starting: Building autoflake.pex from autoflake_default_lockfile.txt
14:16:55.18 [INFO] Completed: Building autoflake.pex from autoflake_default_lockfile.txt
14:16:55.43 [INFO] Completed: Format with Autoflake - autoflake made no changes.
14:16:55.59 [INFO] Completed: Format with Autoflake - autoflake made no changes.
14:16:56.48 [INFO] Starting: Building black.pex from black_default_lockfile.txt
14:17:00.15 [INFO] Completed: Building black.pex from black_default_lockfile.txt
14:17:00.45 [INFO] Completed: Format with Black - black made no changes.

All done! āœØ šŸ° āœØ
8 files left unchanged.

14:17:00.54 [INFO] Completed: Format with Black - black made no changes.
All done! āœØ šŸ° āœØ
69 files left unchanged.

14:17:01.48 [INFO] Starting: Building docformatter.pex from docformatter_default_lockfile.txt
14:17:04.11 [INFO] Completed: Building docformatter.pex from docformatter_default_lockfile.txt
14:17:04.19 [INFO] Completed: Format with docformatter - docformatter made no changes.
14:17:04.22 [INFO] Starting: Building isort.pex from isort_default_lockfile.txt
14:17:04.25 [INFO] Completed: Format with docformatter - docformatter made no changes.
14:17:04.26 [INFO] Canceled: Building isort.pex from isort_default_lockfile.txt
14:17:04.26 [INFO] Starting: Building isort.pex from isort_default_lockfile.txt
14:17:06.05 [INFO] Completed: Building isort.pex from isort_default_lockfile.txt
14:17:06.20 [INFO] Completed: Format with isort - isort made no changes.
14:17:06.26 [INFO] Completed: Format with isort - isort made no changes.

āœ“ autoflake made no changes.
āœ“ black made no changes.
āœ“ docformatter made no changes.
āœ“ isort made no changes.
b
.pants.d/pants.log
sometimes has helpful info
šŸ‘ 1
r
sadly can't access it since these are running inside docker container on aws.
p
it is recommended to upload it as a build artifact for CI runs. see: https://www.pantsbuild.org/docs/using-pants-in-ci#tip-store-pants-logs-as-artifacts
h
Usually cancellation happens when something is satisfied from remote cache
which you don't have set up anyway?
h
Given that things keep restarting, I suspect that it is indeed some thing with pants_ignore. Some file is being generated that is causing pants to think it needs to restart. For example, a .PYC file -- that should already be filtered out by pants, but something like that
h
Yeah, good call, that sounds likely
Well, but it would have to be one of the ingredients to
pytest.pex
, and the only one is
pytest_default_lockfile.txt
Could that be being modified within the CI run somehow?