Commit 30f1069
authored
Add 'advisor' to autorevert_events_v2 action enum (#7878)
## Summary
- Adds `'advisor' = 3` to the `action` Enum8 column in
`misc.autorevert_events_v2`
The autorevert AI advisor lambda ([pytorch/pytorch PR
#177404](pytorch/pytorch#177404)) writes
`action='advisor'` when logging dispatch events to ClickHouse. However,
the table's Enum8 only accepted `none`, `restart`, `revert` — causing
ClickHouse to silently store advisor rows as `action='none'`.
This broke `prior_advisor_exists()` and `advisor_count_for_commit()`
which query `WHERE action = 'advisor'` — they always returned false/0,
so the lambda re-dispatched the advisor workflow for the same (commit,
signal) every ~5 minutes indefinitely.
Already applied live:
```sql
ALTER TABLE misc.autorevert_events_v2
MODIFY COLUMN `action` Enum8('none' = 0, 'restart' = 1, 'revert' = 2, 'advisor' = 3)
```
## Test plan
- [x] Verify schema file matches expected Enum values
- [x] Apply ALTER TABLE on the live ClickHouse instance
- [ ] Confirm subsequent advisor dispatches create rows with
`action='advisor'`
- [ ] Confirm `prior_advisor_exists()` returns true after first
dispatch, preventing duplicates1 parent 3d5b272 commit 30f1069
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments