Skip to content

fix: file not synced after switch sync method -[INS-4347]#7897

Merged
jackkav merged 1 commit intodevelopfrom
fix/file-not-synced
Sep 2, 2024
Merged

fix: file not synced after switch sync method -[INS-4347]#7897
jackkav merged 1 commit intodevelopfrom
fix/file-not-synced

Conversation

@CurryYangxx
Copy link
Member

@CurryYangxx CurryYangxx commented Sep 2, 2024

Issue detail
Sometimes after switch sync method. The file has become not synced.

Root cause
When using models.xx.update function, sometimes will update model by stale data. After switch to Insomnia Sync, we will delete gitRepositoryId in workspaceMeta and delete the corresponding gitrepository. But the workspaceMeta will be overwritten by the stale data, so there is gitRepositoryId in meta but no
gitrepository data.
image

@CurryYangxx
Copy link
Member Author

I think we need try to use updateByParentId rather than update in most case.

@CurryYangxx CurryYangxx requested a review from a team September 2, 2024 08:56
@subnetmarco subnetmarco requested a review from jackkav September 2, 2024 13:26
@jackkav jackkav force-pushed the fix/file-not-synced branch from 4442a80 to 008662c Compare September 2, 2024 13:27
@jackkav jackkav merged commit 251a350 into develop Sep 2, 2024
@jackkav jackkav deleted the fix/file-not-synced branch September 2, 2024 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants