Skip to content

fix(migrations): Fix broken org to group search migration #93931

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

Closed
wants to merge 2 commits into from

Conversation

BYK
Copy link
Member

@BYK BYK commented Jun 20, 2025

This should fix getsentry/self-hosted#3766. That said it will cause data loss for the people who encountered the error as it will skip over the searches without an id. Not sure if this is the best approach as I'm not familiar with the issue.

This should fix getsentry/self-hosted#3766. That said it will cause data loss for the people who encountered the error as it will skip over the searches without an id. Not sure if this is the best approach as I'm not familiar with the issue.
@BYK BYK requested a review from a team as a code owner June 20, 2025 10:03
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 20, 2025
@LordSimal
Copy link

@markstory if you need access to our instance (which was upgraded/migrated manually as described in the issue) for some reason, I can give you access to our server.

@LordSimal
Copy link

Looking at that sentry_groupsearchview table I can see, that the 2nd entry doesn't have a user_id or organisation_id - which seems to be the main problem.

image

I can see it in the UI as well, I am just confused, that it appears in the Recommended Searches part
image

The top 3 saved searches have been added today and they work fine.

Copy link
Member

@markstory markstory left a comment

Choose a reason for hiding this comment

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

Given the state of the schema when this migration would run, I think this is a reasonable solution. Searches that are lacking an owner_id will not be copied into groupsearchview, and will be lost in the future, when the UI switches over to groupsearch view completely.

Copy link
Member

@malwilley malwilley left a comment

Choose a reason for hiding this comment

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

Sorry just wanted to block in case this PR was missed: #93944

There is a followup migration added that checks for the missing owner ID, so we should just skip this one entirely

@BYK
Copy link
Member Author

BYK commented Jun 20, 2025

Closing in favor of #93944

@BYK BYK closed this Jun 20, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 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.

Migrations error after 25.6.0 update
4 participants