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

Require creation metadata during auto release #1831

Merged
merged 2 commits into from
Mar 20, 2019

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Mar 14, 2019

Fixes #1817

In the following circumstances:

  • A registry experiences a fault where it fails to enumerate all
    tags when asked without signalling an error condition
  • The tag for an image in an automated workload is not returned
    by the registry API
  • Older image tags are returned

Flux would roll back the image to an older version, because it
couldn't tell the current image is newer. Instead, Flux now refuses
to automate unless it has timestamp information for the current and
new version, as this assures the made comparison is valid.

@squaremo
Copy link
Member

Nice -- less code, and better safeguard. Can we have a test case, please?

In the following circumstances:

* A registry experiences a fault where it fails to enumerate all
  tags when asked without signalling an error condition
* The tag for an image in an automated workload is not returned
  by the registry API
* Older image tags are returned

Flux would roll back the image to an older version, because it
couldn't tell the current image is newer. Instead, Flux now refuses
to automate unless it has timestamp information for the current and
new version, as this assures the made comparison is valid.
@hiddeco hiddeco force-pushed the 1817-require-image-metadata branch from 2bc805b to be64435 Compare March 15, 2019 13:51
@hiddeco hiddeco requested a review from 2opremio March 15, 2019 14:24
daemon/daemon_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@2opremio 2opremio left a comment

Choose a reason for hiding this comment

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

LGTM.

I wonder if, after this PR, we can simply make the warmer less strict in order to fix #1701 .

daemon/images.go Outdated Show resolved Hide resolved
@hiddeco hiddeco requested a review from squaremo March 19, 2019 10:45
@hiddeco hiddeco force-pushed the 1817-require-image-metadata branch from 0c30068 to 060b092 Compare March 20, 2019 12:43
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.

Looks good, and a welcome fix -- thanks Hidde!

@hiddeco hiddeco merged commit 33c8a7d into master Mar 20, 2019
@hiddeco hiddeco deleted the 1817-require-image-metadata branch March 20, 2019 14:36
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.

3 participants