sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(triage signals): Seer orgs on new pricing need to have Github integration to use autofix

Open Mihir-Mavalankar opened this issue 1 month ago • 8 comments

PR Details

  • We were going to make Seer require the GitHub connection going forward with the new pricing.
  • This PR adds check in the new automation flow only if github repos are not connected.
  • More context in thread: https://sentry.slack.com/archives/C09QCAEA0DR/p1764963646314459

Mihir-Mavalankar avatar Dec 05 '25 21:12 Mihir-Mavalankar

@roaga I'm unsure if this is the right way to stop it in the UI. lmk what you think.

Mihir-Mavalankar avatar Dec 05 '25 21:12 Mihir-Mavalankar

i don't think we're requiring code mappings, only github integration

Okay so that is already checked in the issue details UI right? So i can leave that unchanged.

And in kickoff_seer_automation should I just use get_autofix_integration_setup_problems just to check that the project has github integration?

Mihir-Mavalankar avatar Dec 06 '25 00:12 Mihir-Mavalankar

Actually get_autofix_integration_setup_problems checks the org level integration not project level so I can't use that. The org could have the integration but that specific project might not. Code mapping might be best for project level. Is there any catch/drawback with them?

Mihir-Mavalankar avatar Dec 06 '25 00:12 Mihir-Mavalankar

Actually get_autofix_integration_setup_problems checks the org level integration not project level so I can't use that. The org could have the integration but that specific project might not. Code mapping might be best for project level. Is there any catch/drawback with them?

@Mihir-Mavalankar code mappings are an extra thing people can configure but are an extra piece of work on top of a plain GitHub integration.

If your goal is to stop Autofix from running automation on a project without connected repos, you should check that the project has either code mappings or repos connected via seer project preferences.

To stop it in the UI, you need to do frontend work as Autofix is currently allowed to run without repo connections. It will currently only show a warning at the top.

roaga avatar Dec 08 '25 17:12 roaga

Actually get_autofix_integration_setup_problems checks the org level integration not project level so I can't use that. The org could have the integration but that specific project might not. Code mapping might be best for project level. Is there any catch/drawback with them?

@Mihir-Mavalankar code mappings are an extra thing people can configure but are an extra piece of work on top of a plain GitHub integration.

If your goal is to stop Autofix from running automation on a project without connected repos, you should check that the project has either code mappings or repos connected via seer project preferences.

To stop it in the UI, you need to do frontend work as Autofix is currently allowed to run without repo connections. It will currently only show a warning at the top.

Okay so the backend check is fine since it checks for code mapping via get_autofix_repos_from_project_code_mappings? And I just need to change the frontend check? Or maybe I can remove it for now and add to a later PR?

Mihir-Mavalankar avatar Dec 08 '25 17:12 Mihir-Mavalankar

Actually get_autofix_integration_setup_problems checks the org level integration not project level so I can't use that. The org could have the integration but that specific project might not. Code mapping might be best for project level. Is there any catch/drawback with them?

@Mihir-Mavalankar code mappings are an extra thing people can configure but are an extra piece of work on top of a plain GitHub integration. If your goal is to stop Autofix from running automation on a project without connected repos, you should check that the project has either code mappings or repos connected via seer project preferences. To stop it in the UI, you need to do frontend work as Autofix is currently allowed to run without repo connections. It will currently only show a warning at the top.

Okay so the backend check is fine since it checks for code mapping via get_autofix_repos_from_project_code_mappings? And I just need to change the frontend check? Or maybe I can remove it for now and add to a later PR?

if you're trying to block autofix runs without github integration, the existing check won't do that. The current function to get code mappings is just optional extra data we send to seer

roaga avatar Dec 08 '25 21:12 roaga

Actually get_autofix_integration_setup_problems checks the org level integration not project level so I can't use that. The org could have the integration but that specific project might not. Code mapping might be best for project level. Is there any catch/drawback with them?

@Mihir-Mavalankar code mappings are an extra thing people can configure but are an extra piece of work on top of a plain GitHub integration. If your goal is to stop Autofix from running automation on a project without connected repos, you should check that the project has either code mappings or repos connected via seer project preferences. To stop it in the UI, you need to do frontend work as Autofix is currently allowed to run without repo connections. It will currently only show a warning at the top.

Okay so the backend check is fine since it checks for code mapping via get_autofix_repos_from_project_code_mappings? And I just need to change the frontend check? Or maybe I can remove it for now and add to a later PR?

if you're trying to block autofix runs without github integration, the existing check won't do that. The current function to get code mappings is just optional extra data we send to seer

@roaga so is the only way to check that to call the project preference api in Seer and and check if there is a list of projects?

Mihir-Mavalankar avatar Dec 08 '25 21:12 Mihir-Mavalankar

if the user doesn't have repos connected, automation is not running. Then let's say they set up the repos. Doesn't that mean we won't run automation for a whole hour until the cache expires? Is that acceptable?

Yes. There is a chance that they add repos in that hour but yes, till the cache expires yes. Otherwise we need to find a new way to check if projects have connected repos because calling an endpoint everytime is expensive.

Mihir-Mavalankar avatar Dec 08 '25 23:12 Mihir-Mavalankar