Fix sync_ce_project crash with duplicate zone rows#2227
Draft
marceloamaral wants to merge 3 commits into
Draft
Conversation
update_or_create raised MultipleObjectsReturned when production had multiple CodeEngineProject rows with the same project_id but different zones. Now deletes all existing rows for that project_id and recreates a single clean row without zone.
Member
|
we decided to do an update instead to a delete to have more control by now, tomorrow we will try to find the correct fix to this situation |
Tansito
approved these changes
Jun 11, 2026
Member
|
Moved to draft as I think we can deploy this in staging without this fix as this fix is only required in this specific script. So we can just remove it by now and tomorrow we can look at this calmly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
update_or_createraisedMultipleObjectsReturnedin production when the DB had multipleCodeEngineProjectrows with the sameproject_idbut differentzonevalues (legacy per-zone project configuration)project_idand recreates a single clean row without zoneTest plan