Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

prevent bogus manifest fetching success #1251

Merged
merged 1 commit into from
Jul 25, 2018
Merged

Conversation

rade
Copy link
Contributor

@rade rade commented Jul 24, 2018

An error while fetching an image manifest would return a nil error (hence indicating success) with a unit value image.Info{} struct.

That is bad news for the caller in Warmer.warm(), which will map an image tag to that empty image.Info{}, polluting the cache entry for the image+tag and image in memcached.

When we subsequently use this info to determine the latest suitable tag, we encounter zero CreatedAt timestamps, which, prior to the changes in #1247, #1249 and #1250 would cause the wrong images to be released.

Fixes #1127.

An error while fetching an image manifest would return a nil
error (hence indicating success) with a unit value image.Info{}
struct.

That is bad news for the caller in Warmer.warm(), which will map an
image tag to that empty image.Info{}, polluting the cache entry for
the image+tag and image in memcached.

When we subsequently use this info to determine the latest suitable
tag, we encounter zero CreatedAt timestamps, which, prior to the
changes in #1247, #1249 and #1250 would cause the wrong images to be
released.

Fixes #1127.
Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

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

Another ops! Well found.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants