-
Notifications
You must be signed in to change notification settings - Fork 1.3k
On any change to external services, restart sync #6058
Comments
Just experienced this during release testing, had to kill my instance. |
After discussing this with @tsenart and @ryanslade, let me add some technical details... Previously, without streaming, what
That's what happens here: Now, in that non-streaming version what would happen when we delete an external service that we just added?
In the new, streaming version of the
Now, I think what happens is that when an external service is deleted, (1.b.) will keep on running and not fail: That in turn doesn't fail the whole syncing process in the background. We keep on listing repositories and trying to insert them in the background, until we reach the point of the And that means, that when you then add a new external service the sync it triggers doesn't run until the old one fails completely: What we could do to fix this is to abort a syncing process running in the background when an external service is deleted. Or we could modify the |
We actually don't have a foreign key constraint between the repo table and the external_services table. The relationship is stored in the |
interesting. So then the question, and I guess part of this ticket, is: why did this not happen previously? Or did it? |
Thanks for writing this! I got a lot context by reading it.
I think we also need to abort when the external service is updated (change of repo scopes). |
Agree! |
Dear all, This is your release captain speaking. 🚂🚂🚂 Branch cut for the 3.10 release is scheduled for tomorrow. Is this issue / PR going to make it in time? Please change the milestone accordingly. Thank you |
I'm moving this to 3.11 since we don't have an owner on this issue yet, and most likely miss the branch cut. |
@unknwon: Until we know we'll tackle this in 3.11, it's better to backlog. |
In the case of large instances a sync can take a long time. This mixed in with streaming can lead to unexpected behaviour. For example adding an external service, then deleting it. If it is adding a lot of repositories, we will continue to add the repositories even though the service is now gone.
The text was updated successfully, but these errors were encountered: