You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[autorevert] use 'tests.all_test_runs' instead of 'default.test_run_s3' for test signals (#7439)
This table is populated before the workflow finishes, providing much
better TTS for autorevert.
testing:
```
python -m pytorch_auto_revert --dry-run autorevert-checker Lint trunk pull inductor --hours 24 --hud-html
```
ses also:
pytorch/pytorch#166988#7434
Copy file name to clipboardExpand all lines: aws/lambda/pytorch-auto-revert/SIGNAL_EXTRACTION.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,33 +43,33 @@ Notes
43
43
- This preserves all runs (original + restarts) and per‑run attempts (`run_attempt`).
44
44
- Job retries typically show up as separate job rows; names may include `Attempt #2` and have later `started_at`.
45
45
46
-
## Phase B — Test Details Fetch (batched, from `default.test_run_s3`)
46
+
## Phase B — Test Details Fetch (batched, from `tests.all_test_runs`)
47
47
48
-
Decide in Python which jobs belong to the test‑track (e.g., `rule IN ('pytest failure','Python unittest failure')`. For those (job_id, run_id[, run_attempt]) triples, fetch per‑test rows directly from `default.test_run_s3` — this table contains one row per testcase, including successful ones (failure_count=0, error_count=0).
48
+
Decide in Python which jobs belong to the test‑track (e.g., `rule IN ('pytest failure','Python unittest failure')`). For those (job_id, run_id[, run_attempt]) triples, fetch per‑test rows directly from `tests.all_test_runs` — this table contains one row per testcase and is populated earlier while jobs may still be running.
49
49
50
-
Why `test_run_s3` only?
51
-
- We need per‑test identities to build per‑test Signals; `default.test_run_s3` has them. Summary is optional and redundant for this layer.
50
+
Why `tests.all_test_runs`?
51
+
- We need per‑test identities to build per‑test Signals; `tests.all_test_runs` has them and is populated earlier than the final summary tables. Summary is optional and redundant for this layer.
52
52
- Performance remains good by filtering on `job_id IN (...)` (first PK column) and grouping; limit to the time window implicitly via the selected job set from Phase A.
53
53
54
54
Job selection for test track:
55
55
- Step 1: find normalized job base names that exhibited a test‑related classification in any commit within the window.
56
56
- Step 2: include ALL jobs across ALL commits whose normalized base is in that set (original runs, restarts; any run_id/attempt) so we can observe successes or pendings for the same test on other commits.
57
57
58
-
Optimized batched test_run_s3 query (for N job_ids):
58
+
Optimized batched all_test_runs query (for N job_ids):
GROUP BY job_id, workflow_id, workflow_run_attempt, file, classname, name
69
69
```
70
70
71
71
Notes
72
-
- Use `job_id IN (...)` to leverage the PK prefix `(job_id, name, classname, invoking_file, file)`.
72
+
- Use `job_id IN (...)` to leverage the table’s primary key prefix on `job_id`.
73
73
- We keep `workflow_run_attempt` to distinguish attempts within the same workflow run.
74
74
75
75
## Mapping to Signals
@@ -83,7 +83,7 @@ Notes
83
83
Ordering: dicts in Python 3.7+ preserve insertion order. Phase A inserts commit keys in push‑timestamp DESC order, so iterating the mapping yields newest→older commits without extra sorting.
84
84
85
85
### Test‑track semantics
86
-
- Source of truth for SUCCESS/FAILURE is `default.test_run_s3` per test id.
86
+
- Source of truth for SUCCESS/FAILURE is `tests.all_test_runs` per test id.
87
87
- When a test row exists for an attempt:
88
88
- Emit at most one FAILURE if any failed runs exist; at most one SUCCESS if any successful runs exist.
89
89
- When no test rows exist for an attempt and any grouped job for that attempt is pending → emit PENDING.
0 commit comments