-
Notifications
You must be signed in to change notification settings - Fork 2
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
Decide and apply file rename/modify strategy #76
Comments
We have a previous discussion here. |
Hello @yeraydavidrodriguez Thank-you for the clear write-up. Since we have a clean I think that this is the fastest, and most reliable for at this stage of the development. While I previously recommend that we use the most minimal, methodology:
We can update it to:
This optimization should be safe and should work in all cases. |
and what about "Modify" @da2ce7 ? (Same filename different content)
|
Hello @josecelano and @yeraydavidrodriguez I think that modify can be interpreted as a |
OK, thank you for the clarification |
Thank you both, everything is clear to implementation. I close this issue. |
When a gold image is renamed, there is a new element in the DVC Diff structure:
This renaming can be applied to the corresponding base image and the git repository with two different approaches:
Those two approaches fulfill the basic requirement (a file identical to the old one remains in the repo, but with the new name), but they have specific pros and cons:
Simplicity: The second approach allows us to implement all file management (add/delete/modify/rename) with only two operations (add and delete), therefore maintaining less complexity and performing fewer types of git operations. All events linked with file add and delete actions will be also triggered automatically with the rename operation, simplifying the workflow.
Performance: However, the first approach is much faster and independent of file sizes. This can be irrelevant for a single rename of a small file, but a batch rename of thousands of files (i.e. a name schema change or adding a prefix), the difference can be dramatic.
The same occurs with the modify operations: are we going to support it with a "modify" commit, or shall we delete the old file and add the new one?
In this second scenario, both alternatives have similar performance, so if we decide to use a "delete + add" strategy for the rename operation, the same could be advisable for the modify operation.
A decision about the most convenient approach should be taken and implemented, if applicable.
The text was updated successfully, but these errors were encountered: