Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require creation metadata during auto release #1831

Merged
merged 2 commits into from Mar 20, 2019

Conversation

Projects
None yet
3 participants
@hiddeco
Copy link
Member

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

This comment has been minimized.

Copy link
Member

commented Mar 14, 2019

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

Require creation metadata during auto release
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 Mar 15, 2019

@hiddeco hiddeco requested a review from 2opremio Mar 15, 2019

Show resolved Hide resolved daemon/daemon_test.go Outdated
@2opremio
Copy link
Collaborator

left a comment

LGTM.

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

Show resolved Hide resolved daemon/images.go Outdated

@hiddeco hiddeco requested a review from squaremo Mar 19, 2019

@hiddeco hiddeco force-pushed the 1817-require-image-metadata branch from 0c30068 to 060b092 Mar 20, 2019

@squaremo
Copy link
Member

left a comment

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

@hiddeco hiddeco merged commit 33c8a7d into master Mar 20, 2019

1 check passed

ci/circleci: build Your tests passed on CircleCI!
Details

@hiddeco hiddeco deleted the 1817-require-image-metadata branch Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.