Skip to content

fix(aci): Delete rows from GroupOpenPeriod #92687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2025
Merged

Conversation

snigdhas
Copy link
Member

@snigdhas snigdhas commented Jun 2, 2025

Need to iterate over the rows because there's too many to simply .all().delete()

@snigdhas snigdhas requested a review from a team June 2, 2025 20:39
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 2, 2025
Copy link
Contributor

github-actions bot commented Jun 2, 2025

This PR has a migration; here is the generated SQL for src/sentry/migrations/0915_delete_open_period_rows.py

for 0915_delete_open_period_rows in sentry

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

@snigdhas snigdhas marked this pull request as ready for review June 2, 2025 22:32
@snigdhas snigdhas requested a review from a team as a code owner June 2, 2025 22:32
@vgrozdanic
Copy link
Member

The code looks good, but can you please provide some more context around this, why is this being done?

I see a PR opened before this one to backfill the data into this table.

Are we going to delete all of the data, and then do the backfilling?

Copy link
Contributor

@saponifi3d saponifi3d left a comment

Choose a reason for hiding this comment

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

Are we going to delete all of the data, and then do the backfilling?

@vgrozdanic - yeah that's the plan, the migration had some missing data so trying again.


PR lgtm from the product side.

Copy link
Contributor

github-actions bot commented Jun 3, 2025

This PR has a migration; here is the generated SQL for src/sentry/migrations/0916_delete_open_period_rows.py

for 0916_delete_open_period_rows in sentry

--
-- Raw Python operation
--
-- THIS OPERATION CANNOT BE WRITTEN AS SQL

@snigdhas
Copy link
Member Author

snigdhas commented Jun 3, 2025

@vgrozdanic we had a bug in the logic to write to this table hence the need to delete the rows. The data in GroupOpenPeriod isn't used anywhere yet, so the plan is to delete the rows, resume writes (feature-flagged), then backfill for existing groups

@vgrozdanic
Copy link
Member

@vgrozdanic we had a bug in the logic to write to this table hence the need to delete the rows. The data in GroupOpenPeriod isn't used anywhere yet, so the plan is to delete the rows, resume writes (feature-flagged), then backfill for existing groups

Got it, thanks for clarifying! 🙏

@snigdhas snigdhas merged commit 6e0d851 into master Jun 3, 2025
61 checks passed
@snigdhas snigdhas deleted the snigdha/delete-rows-gop branch June 3, 2025 17:17
andrewshie-sentry pushed a commit that referenced this pull request Jun 3, 2025
Need to iterate over the rows because there's too many to simply
`.all().delete()`
@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants