HomeSoftware Heritage

Allow images tagged latest to update on each run
e01a33fbfdedUnpublished

Unpublished Commit · Learn More

  • Repository Importing: This repository is still importing.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Allow images tagged latest to update on each run

Restore the code to update images tagged with 'latest' on each run,
moving this to be guarded by a refreshonly meta-parameter that is
triggered by a notify resource that is disabled for 'noop'.

Because the original code to update images was run via 'onlyif' to
indicate if the image was in sync by performing a pull and testing the
new digest against the old, this meant that simply applying 'noop' to
this exec resource would not work. 'noop' does not affect running the
components of a resource to validate if it is in-sync, which is the
purpose of the 'onlyif' & 'unless' settings for an exec.

To support 'noop' mode, previously the code to update the image on each
run was dropped to prevent it accidentally refreshing the local image
and then skipping an image restart because there was no update event on
a subsequent real run.

To resolve, it is necessary to have a prior resource that is used as a
proxy, and only when it notifies the image update resource, will the
'onlyif' action be tested to determine if in sync. This prior resource
can be disabled from a noop run, and subsequently although puppet
records that it would send a refresh event in 'noop' mode, none are
actually sent during a 'noop' run thus preventing the image from being
updated by a side effect of checking if the notified exec was in-sync.

Fixes #316

Details

Provenance
Darragh Bailey <dbailey@hpe.com>Authored on Apr 2 2019, 1:54 PM
olasdPushed on Dec 2 2019, 6:03 PM
Parents
R205:ddd99ac4439e: Update readme for aws logging options (#459)
Branches
Unknown
Tags
Unknown

Event Timeline