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

VR-5185 Commit reuploads versioned blobs everytime it is saved #963

Merged
merged 4 commits into from
Jul 12, 2020

Conversation

nhatsmrt
Copy link
Contributor

@nhatsmrt nhatsmrt commented Jul 11, 2020

On top of #962.

@conradoverta I found a new bug that I didn't think of before: Every time the commit saves, it attempts to reupload the blobs that were previously designated to enableMDBVersioning, even though user does not update that blob.

This is because unlike the Python client, I used the flag enableMDBVersioning for both upload-able and download-able check.
This is wrong; a blob might be downloadable, but no need to be uploaded when the commit is saved (as it has been uploaded before, and there is no update since).

The solution is to decouple these two states. I add another (immutable) field called downloadable, which is a user-friendly name for internal_versioned_path.isDefined.

I've also updated one of the tests, which would now fail under my old implementation, but pass under my new implementation.

@nhatsmrt nhatsmrt changed the title Scala client download fix VR-5185 Commit reuploads versioned blobs everytime it is saved Jul 11, 2020
Copy link
Contributor

@conradoverta conradoverta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@conradoverta conradoverta merged commit 25e8354 into VertaAI:master Jul 12, 2020
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