Currently it's possible for the client to create a flavor version and simply not upload any files. Storing the file hashes in the db when creating the flavor version can lead to a problem, where image builds of subsequent flavor versions will fail.
This can be triggered by simply not uploading files for the previous flavor version. The files that should be uploaded are calculated by what files the previous flavor version contained.
In order to avoid this problem, we will not store the file hashes when creating the flavor versions and instead do the following:
- just calculating the xxh3 hash for the whole changeset using a merkletree when doing
CreateFlavorVersion and assigning it to the flavor version.
- determine the files that need to be uploaded when doing
GetUploadURL and send them to the client
- verifying that all uploaded files are complete by calculating the xxh3 hash of the uploaded changeset
- then storing all file hashes in the db, once we uploaded them into the blob store (s3)
this way we ensure blob store consistency.
Currently it's possible for the client to create a flavor version and simply not upload any files. Storing the file hashes in the db when creating the flavor version can lead to a problem, where image builds of subsequent flavor versions will fail.
This can be triggered by simply not uploading files for the previous flavor version. The files that should be uploaded are calculated by what files the previous flavor version contained.
In order to avoid this problem, we will not store the file hashes when creating the flavor versions and instead do the following:
CreateFlavorVersionand assigning it to the flavor version.GetUploadURLand send them to the clientthis way we ensure blob store consistency.