Skip to content

engine: check if images still exist when deciding whether to build#1806

Merged
landism merged 1 commit into
masterfrom
matt/handle_reaped_images
Jul 3, 2019
Merged

engine: check if images still exist when deciding whether to build#1806
landism merged 1 commit into
masterfrom
matt/handle_reaped_images

Conversation

@landism

@landism landism commented Jul 3, 2019

Copy link
Copy Markdown
Member

This fixes #1768

Problem

When Tilt decides whether an image needs to build, it basically just checks whether it knows the id of a previous build that hasn't been invalidated. This only works on the assumption that it's a closed system. In reality, kubelet can come in and delete images to free up disk space, or the user could have manually deleted the image, or whatever. This leads to a build error when we try to use a ref that no longer exists.

Solution

When determining whether to build an image, check both whether we have an image id and whether that id points at an image that still exists.

@landism
landism requested review from jazzdan and nicks July 3, 2019 16:22

@jazzdan jazzdan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@landism
landism merged commit 301771b into master Jul 3, 2019
@landism
landism deleted the matt/handle_reaped_images branch July 3, 2019 16:38
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.

image reaping causes build errors

2 participants