Skip to content

Add 'advisor' to autorevert_events_v2 action enum#7878

Merged
izaitsevfb merged 1 commit intomainfrom
update-autorevert-event-enum
Mar 24, 2026
Merged

Add 'advisor' to autorevert_events_v2 action enum#7878
izaitsevfb merged 1 commit intomainfrom
update-autorevert-event-enum

Conversation

@izaitsevfb
Copy link
Copy Markdown
Contributor

@izaitsevfb izaitsevfb commented Mar 24, 2026

Summary

  • Adds 'advisor' = 3 to the action Enum8 column in misc.autorevert_events_v2

The autorevert AI advisor lambda (pytorch/pytorch PR #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:

ALTER TABLE misc.autorevert_events_v2
  MODIFY COLUMN `action` Enum8('none' = 0, 'restart' = 1, 'revert' = 2, 'advisor' = 3)

Test plan

  • Verify schema file matches expected Enum values
  • 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 duplicates

The autorevert AI advisor lambda writes action='advisor' to ClickHouse,
but the Enum8 column only accepted 'none', 'restart', 'revert'. This
caused all advisor rows to be silently stored as 'none', breaking the
dedup query (prior_advisor_exists) which filters on action='advisor'.
The result was unlimited re-dispatches of the advisor workflow for the
same (commit, signal) pair every ~5 minutes.

Authored with Claude.
@pytorch-bot pytorch-bot bot added the ci-no-td label Mar 24, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
torchci Ignored Ignored Mar 24, 2026 10:53pm

Request Review

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 24, 2026
@izaitsevfb izaitsevfb requested a review from jeanschmidt March 24, 2026 22:56
@izaitsevfb izaitsevfb merged commit 30f1069 into main Mar 24, 2026
8 checks passed
@izaitsevfb izaitsevfb deleted the update-autorevert-event-enum branch March 24, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants