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

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 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 June 24, 2019 09:30
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.

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 Compare July 1, 2019 14:00
@hiddeco hiddeco merged commit 3cab57f into master Jul 1, 2019
@hiddeco hiddeco deleted the enhancement/zero-created-ts-semver branch July 1, 2019 14:14
@hiddeco hiddeco added this to the 1.13.2 milestone Jul 1, 2019
squaremo pushed 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 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