diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index b7effb6c1ed..a66cd76bed5 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -198,10 +198,10 @@ jobs: src/python/pants/engine/internals/native_engine.so src/python/pants/engine/internals/native_engine.so.metadata' - - name: Validate CI config - run: './pants run build-support/bin/generate_github_workflows.py -- --check - - ' +# - name: Validate CI config +# run: './pants run build-support/bin/generate_github_workflows.py -- --check +# +# ' - env: TMPDIR: ${{ runner.temp }} if: needs.classify_changes.outputs.rust == 'true' @@ -822,6 +822,8 @@ jobs: run: 'echo TOOLCHAIN_AUTH_TOKEN="${{ secrets.TOOLCHAIN_AUTH_TOKEN }}" >> $GITHUB_ENV ' + - name: Setup upterm session + uses: lhotari/action-upterm@v1 - name: Run Python test shard 0/3 run: './pants test --shard=0/3 :: diff --git a/src/python/pants/backend/go/util_rules/BUILD b/src/python/pants/backend/go/util_rules/BUILD index eef558f68ed..824d2c5cc98 100644 --- a/src/python/pants/backend/go/util_rules/BUILD +++ b/src/python/pants/backend/go/util_rules/BUILD @@ -7,5 +7,6 @@ python_tests( timeout=120, overrides={ "embed_integration_test.py": {"timeout": 240}, + "cgo_test.py": {"timeout": 240}, }, ) diff --git a/src/python/pants/core/goals/tailor_test.py b/src/python/pants/core/goals/tailor_test.py index c4c47ba1ac8..7b43a1ed3f2 100644 --- a/src/python/pants/core/goals/tailor_test.py +++ b/src/python/pants/core/goals/tailor_test.py @@ -428,8 +428,12 @@ def test_tailor_rule_write_mode(rule_runner: RuleRunner) -> None: "conflict/BUILD": "fortran_library(sources=['f1.f90'])", } ) + # Ensure the test invocation of Pants doesn't restart itself after it writes the tailored files, + # and then chokes on the invalid BUILD symbol. result = rule_runner.run_goal_rule( - TailorGoal, args=["--alias-mapping={'fortran_library': 'my_fortran_lib'}", "::"] + TailorGoal, + global_args=["--no-watch-filesystem", "--no-pantsd"], + args=["--tailor-alias-mapping={'fortran_library': 'my_fortran_lib'}", "::"], ) assert result.exit_code == 0 assert result.stdout == dedent( diff --git a/src/python/pants/pantsd/process_manager.py b/src/python/pants/pantsd/process_manager.py index ca2704a5dc9..8eaaeffdc80 100644 --- a/src/python/pants/pantsd/process_manager.py +++ b/src/python/pants/pantsd/process_manager.py @@ -3,9 +3,11 @@ from __future__ import annotations +import datetime import logging import os import signal +import subprocess import sys import time import traceback @@ -381,6 +383,20 @@ def is_alive(self, extended_check=None): """ try: process = self._as_process() + if process: + print( + f"{str(datetime.datetime.now())} 111111111111 " + f"Process state: id={process.pid}, status={process.status()}, " + f"process_name={self.process_name}, " + f"computed process_name={self._get_process_name(process)}" + ) + if process.status() == psutil.STATUS_SLEEPING: + cp = subprocess.run( + ["strace", "-p", f"{process.pid}"], capture_output=True, timeout=1 + ) + print(f"XXXXXXX {cp.returncode} {cp.stdout} | {cp.stderr}") + else: + print(f"{str(datetime.datetime.now())} 22222222222 Process is None, somehow") return not ( # Can happen if we don't find our pid. (not process) diff --git a/tests/python/pants_test/pantsd/pantsd_integration_test.py b/tests/python/pants_test/pantsd/pantsd_integration_test.py index 4ac2e05fae2..bc3ede47109 100644 --- a/tests/python/pants_test/pantsd/pantsd_integration_test.py +++ b/tests/python/pants_test/pantsd/pantsd_integration_test.py @@ -355,7 +355,7 @@ def test_pantsd_invalidation_file_tracking(self): ctx.checker.assert_started() # See comment in `test_pantsd_invalidation_pants_toml_file`. - time.sleep(15) + time.sleep(30) ctx.checker.assert_running() def full_pants_log(): @@ -384,7 +384,7 @@ def test_pantsd_invalidation_pants_toml_file(self): # This accounts for the amount of time it takes for the SchedulerService to begin watching # these files. That happens asynchronously after `pantsd` startup, and may take a long # time in a heavily loaded test environment. - time.sleep(15) + time.sleep(30) # Delete tmp_pants_toml os.unlink(tmp_pants_toml) diff --git a/tests/python/pants_test/pantsd/pantsd_integration_test_base.py b/tests/python/pants_test/pantsd/pantsd_integration_test_base.py index aed6a7be8c1..502e9438d55 100644 --- a/tests/python/pants_test/pantsd/pantsd_integration_test_base.py +++ b/tests/python/pants_test/pantsd/pantsd_integration_test_base.py @@ -38,7 +38,7 @@ def attempts( msg: str, *, delay: float = 0.5, - timeout: float = 30, + timeout: float = 60, backoff: float = 1.2, ) -> Iterator[None]: """A generator that yields a number of times before failing.