Skip to content

Conversation

@armenzg
Copy link
Member

@armenzg armenzg commented Jan 13, 2026

In #105844 (while we were debugging s4s2) we switched to using whitelisted GitHub orgs rather than options.

Now that we've made progress in s4s2 we can add using options back again. We will drop whitelisted orgs in the future.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 13, 2026
Copy link
Member

@suejung-sentry suejung-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with approving this to be merged if you're feeling confident in the logic but my feeble brain can't handle all the boolean logic to uncover any bugs lol so suggested some renaming to help, or we can just get this merged since we're going to rip it out in a matter of days anyway.

return None


def should_proceed(github_event: GithubWebhookType, event_payload: Mapping[str, Any]) -> bool:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming nit alert
should_forward_to_seer ?

assert not mock_request.called
assert mock_request.call_count == 1
pr_call = mock_request.call_args
assert pr_call[1]["path"] == "/v1/automation/overwatch-request"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this was the bug you found because since we have not turned on any flags it should still go to overwatch but I am struggling for what exactly was flipped. Was it a missing None handling somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests in this class need to be reviewed since we always call the task from the handlers rather the way we do it in this class:

       process_github_webhook_event._func(
            github_event=GithubWebhookType.PULL_REQUEST,
            event_payload=event_payload,
            enqueued_at_str=self.enqueued_at_str,
        )

I will look into it tomorrow.

@armenzg armenzg changed the title 1 13/also options/code review/armenzg feat(code_review): Support options & white listed orgs Jan 13, 2026
@armenzg armenzg self-assigned this Jan 13, 2026
}


def get_github_events_to_forward_overwatch() -> set[GithubWebhookType]:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dropping this to simplify the code.

target_commit_sha=target_commit_sha,
trigger=SeerCodeReviewTrigger.ON_COMMAND_PHRASE,
)
record_webhook_enqueued(github_event, github_event_action)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now tracked inside of of schedule_task.

"""
status = "success"
should_record_latency = True
option_key = get_webhook_option_key(github_event)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole block is unnecessary since we check at the handlers level.

assert not mock_request.called
assert mock_request.call_count == 1
pr_call = mock_request.call_args
assert pr_call[1]["path"] == "/v1/automation/overwatch-request"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests in this class need to be reviewed since we always call the task from the handlers rather the way we do it in this class:

       process_github_webhook_event._func(
            github_event=GithubWebhookType.PULL_REQUEST,
            event_payload=event_payload,
            enqueued_at_str=self.enqueued_at_str,
        )

I will look into it tomorrow.

@armenzg armenzg marked this pull request as ready for review January 13, 2026 20:23
@armenzg armenzg requested a review from a team as a code owner January 13, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants