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

Only require image TS when it is used for sorting #2175

Merged
merged 1 commit into from Jul 1, 2019

Conversation

@hiddeco
Copy link
Member

hiddeco commented Jun 20, 2019

As the semver filter does not make use of the image creation timestamp
for filtering and sorting images, but instead has its own logic based
on the semver spec, the block for automated image updates when a
timestamp was missing for an image with a semver filter policy did more
harm than good.

This commit introduces a RequiresTimestamp method on the Pattern
interface to indicate if the filter needs the timestamps on images to
be present to give a reliable filtered and sorted output. Which is
implemented in calculateChanges, so we only bail on missing
timestamps when they are actually required.

Addresses #2172, but is by no means a fix.

@hiddeco hiddeco requested a review from squaremo Jun 24, 2019
Copy link
Member

squaremo left a comment

Yep this looks reasonable, thanks Hidde

As the semver filter does not make use of the image creation timestamp
for filtering and sorting images, but instead has its own logic based
on the semver spec, the block for automated image updates when a
timestamp was missing for an image with a semver filter policy did more
harm than good.

This commit introduces a `RequiresTimestamp` method on the `Pattern`
interface to indicate if the filter needs the timestamps on images to
be present to give a reliable filtered and sorted output. Which is
implemented in `calculateChanges`, so we only bail on missing
timestamps when they are actually required.
@hiddeco hiddeco force-pushed the enhancement/zero-created-ts-semver branch from f5cd554 to b4558a5 Jul 1, 2019
@hiddeco hiddeco merged commit 3cab57f into master Jul 1, 2019
3 checks passed
3 checks passed
tag-filter tag-filter
Details
helm-lint helm-lint
Details
ci/circleci: build Your tests passed on CircleCI!
Details
@hiddeco hiddeco deleted the enhancement/zero-created-ts-semver branch Jul 1, 2019
@hiddeco hiddeco added this to the 1.13.2 milestone Jul 1, 2019
squaremo added a commit that referenced this pull request Jul 10, 2019
Only require image TS when it is used for sorting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.