Skip to content
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

Backup one file at a time #1859

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Backup one file at a time #1859

merged 1 commit into from
Jan 27, 2025

Conversation

scott-rc
Copy link
Collaborator

This is an attempt to fix the Error: dest already exists. issues that keep popping up.

While trying to reproduce this issue, I noticed the Error: dest already exists. error being logged when I deleted a model in Gadget's editor and then ran ggt pull. The error was happening while attempting to move deleted files into .gadget/backup/. The deleted files that failed to move into .gadget/backup/ eventually succeeded because we wrap the move within a pRetry, so I didn't experience the final failure that causes ggt to crash.

I'm not sure how the file moves eventually succeeded because I didn't see the "removing file in the way of backup path" log line, which is how we typically recover from failing to move a file into .gadget/backup/... my current theory is that all of these issues are stemming from moving all the files in parallel, so this PR changes our file move logic to move all the files one at a time. After making this change, I didn't see any more Error: dest already exists. errors after deleting a model in Gadget's editor and running ggt pull.

Copy link

changeset-bot bot commented Jan 27, 2025

🦋 Changeset detected

Latest commit: 56239d6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ggt Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@scott-rc scott-rc force-pushed the sc/backup-one-file-at-a-time branch from 38fb4e9 to e7d0ae3 Compare January 27, 2025 18:50
@scott-rc scott-rc force-pushed the sc/backup-one-file-at-a-time branch from e7d0ae3 to 56239d6 Compare January 27, 2025 18:52
@scott-rc scott-rc enabled auto-merge (squash) January 27, 2025 18:53
@scott-rc scott-rc merged commit 3f9b60d into main Jan 27, 2025
6 checks passed
@scott-rc scott-rc deleted the sc/backup-one-file-at-a-time branch January 27, 2025 18:54
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.

1 participant