sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(ci): Adding migrations approval check to CI

Open IanWoodard opened this issue 1 year ago • 5 comments

As part of a push to prevent problematic migrations from being merged, this PR adds an additional check that ensures migrations are approved by a member of owners-migrations. One thing to note is that in order for this to work properly, we will have to make this a required action once this is merged. It is worth noting that if a change does not touch a migration, this workflow is skipped meaning it won't block merging (even if required).

IanWoodard avatar Feb 01 '24 23:02 IanWoodard

what are we trying to solve here. this feels like extra gatekeeping. we should trust developers to do the right thing and if they don't that's a people management problem

asottile-sentry avatar Feb 02 '24 08:02 asottile-sentry

@asottile-sentry I agree this is extra process, but it's coming from an incident that took down Sentry because of a bad migration that wasn't thoroughly reviewed by the right folks, so the tradeoff feels worth it

snigdhas avatar Feb 06 '24 21:02 snigdhas

That makes sense, I've got a spec started for a system-based improvement. We'd need to start running the migration checks on all SQL migrations and not just those generated by Django.

I'm still working through specifics, and I plan to open a Github Issue for the library, but it looks like that library is just being maintained for new versions and not adding new features so it would have to be something we fork and build ourselves.

I'd love your thoughts on how feasible something like this would be.

snigdhas avatar Feb 06 '24 22:02 snigdhas

my 2c is we should just ban custom sql

asottile-sentry avatar Feb 07 '24 01:02 asottile-sentry

I don't think that's the right solution here. Perhaps we need is a larger set of people to be part of migrations-owners to distribute review load. Migrations likely don't need a <24h review turnaround given they're often risky. I'll add this as a discussion topic for the next TSC to run it by other folks.

snigdhas avatar Feb 09 '24 22:02 snigdhas

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Mar 13 '24 07:03 getsantry[bot]