Skip to content

Fix race condition in image cleanup when import local image#118

Merged
idroz merged 1 commit intobravetools:masterfrom
Szubie:deploy-cleanup-race-condition
Aug 2, 2022
Merged

Fix race condition in image cleanup when import local image#118
idroz merged 1 commit intobravetools:masterfrom
Szubie:deploy-cleanup-race-condition

Conversation

@Szubie
Copy link
Collaborator

@Szubie Szubie commented Aug 2, 2022

When running brave deploy or brave build against a local image, the image fingerprint would not be returned until after the image was fully imported (we had to wait for operation to complete). As a result, interruption to build/deploy at this stage would mean cleanup code failed to work as it didn't have the image fingerprint to delete.

Instead we can get the sha256 hash from the local file on disk instead to get the image fingerprint before starting the import for local images. This allows for cleanup without race conditions.

…n to get image fingerprint before importing local images for build or deployment to allow for cleanup without race conditions
@idroz idroz merged commit 7df9ba1 into bravetools:master Aug 2, 2022
@Szubie Szubie deleted the deploy-cleanup-race-condition branch August 2, 2022 13:14
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