Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/200942
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 8e934bb with merge base 8cd072a ( 🟡 GREEN LIGHT - PR requires human review:
reason: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
fcc6012 to
87b4ba1
Compare
445584a to
8e934bb
Compare
| @@ -1259,17 +1259,13 @@ def wait_for_process(p, timeout=None): | |||
| except subprocess.TimeoutExpired: | |||
| # send SIGINT to give pytest a chance to make xml | |||
| p.send_signal(signal.SIGINT) | |||
There was a problem hiding this comment.
My agent flagged that on Windows, p.send_signal(signal.SIGINT) raises ValueError, so the timeout never kills the child or returns 124, and timed_out never gets recorded. This is pre-existing (it shows up in CI as <file> failed! Unsupported signal: 2), so not blocking. But it'd be great to have a follow-up so Windows timeouts show up in the tables too.
There was a problem hiding this comment.
Let's follow up: pytorch/test-infra#9133
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
**Summary:** A pytest session that never starts a test, such as run_test.py's serial pass over a file without serial tests, now removes its report when it ends. Such a report holds only the report line, so it adds no rows, but each one is still uploaded and ingested; removing them cuts that ingest traffic. The report is kept whenever a test started, so the crash and timeout handling from #200942 is unaffected: run_test.py only appends a run the writer published when its test started. A session whose writer turned itself off, or a process that dies before its first test, still leaves its report. Not `session.testscollected == 0`: under xdist it's the last worker's count, so if a crashed worker's replacement collects nothing, it could delete a report that already has runs. **Test Plan:** ``` CUDA_VISIBLE_DEVICES= python test/torchci/test_testing.py -v python test/run_test.py --cpp -i cpp/c10_typeid_test --save-torchci-reports <dir> ``` `test_session_without_tests_leaves_no_report` covers sessions that start no test, with and without xdist; the existing `TestReportCrashes` tests cover the reports that must be kept. The C++ launch now leaves one report instead of two. Authored with the help of an AI assistant (Claude). Pull Request resolved: #201118 Approved by: https://github.com/jathu
…#201118) **Summary:** A pytest session that never starts a test, such as run_test.py's serial pass over a file without serial tests, now removes its report when it ends. Such a report holds only the report line, so it adds no rows, but each one is still uploaded and ingested; removing them cuts that ingest traffic. The report is kept whenever a test started, so the crash and timeout handling from pytorch#200942 is unaffected: run_test.py only appends a run the writer published when its test started. A session whose writer turned itself off, or a process that dies before its first test, still leaves its report. Not `session.testscollected == 0`: under xdist it's the last worker's count, so if a crashed worker's replacement collects nothing, it could delete a report that already has runs. **Test Plan:** ``` CUDA_VISIBLE_DEVICES= python test/torchci/test_testing.py -v python test/run_test.py --cpp -i cpp/c10_typeid_test --save-torchci-reports <dir> ``` `test_session_without_tests_leaves_no_report` covers sessions that start no test, with and without xdist; the existing `TestReportCrashes` tests cover the reports that must be kept. The C++ launch now leaves one report instead of two. Authored with the help of an AI assistant (Claude). Pull Request resolved: pytorch#201118 Approved by: https://github.com/jathu
BC-breaking
Only run_test.py's logging: every test-file timeout now surfaces as exit code 124, see the exit code note under Agent details.
Summary
Handle crashes and timeouts for torchci-reports.
Test Plan
Create intentional errors in this PR (fcc6012), and check ClickHouse.
Agent details
The notes below were written with Claude.
Exit code change.
wait_for_processnow re-raises the timeout even when pytest exits during the 5 s SIGINT grace period, soretry_shellreturns 124 for every timeout instead of pytest's own exit code (usually 2). Retries are unchanged: both codes were already treated as failures. The--subprocessparent logs "Command took >15min, retrying" instead of "Got exit code 2, retrying", and an import-time hang interrupted by SIGINT is reported as 124 instead of "Received signal: SIGINT". The report format change is additive: two newoutcomevalues,crashedandtimed_out, which the ingestion lambda already accepts.Authored with Claude