Commit 63ff3fa
authored
Fix dynamo key queries to use trailing slashes for accurate repo matching (#7632)
### Problem
Queries using dynamoKey LIKE 'pytorch/pytorch%' incorrectly match
commits from pytorch/pytorch-integration-testing, causing (among else)
autorevert to process "ghost commits" that don't exist in
pytorch/pytorch.
### Solution
Add trailing slash/delimiter to LIKE patterns:
- push table: pytorch/pytorch//% (double slash matches {repo}//{uuid}
format)
- Other tables: pytorch/pytorch/% (single slash matches {repo}/{id}
format)
---
### Testing
autorevert:
```
python -m pytorch_auto_revert --dry-run autorevert-checker pull --hours 12 --hud-html
```
rest: manual query run.1 parent 8a367f5 commit 63ff3fa
File tree
4 files changed
+13
-6
lines changed- aws/lambda
- ci-queue-pct
- pytorch-auto-revert/pytorch_auto_revert
- torchci/clickhouse_queries
- merge_retry_rate
- pr_landing_time_avg
4 files changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
| 339 | + | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
| 27 | + | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
29 | 31 | | |
| |||
0 commit comments