Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Idempotency Issues #26

Open
petems opened this issue Apr 9, 2016 · 5 comments
Open

Idempotency Issues #26

petems opened this issue Apr 9, 2016 · 5 comments

Comments

@petems
Copy link
Contributor

petems commented Apr 9, 2016

Caveats

  • Some people use the workflow of releasing a Package to PackageCloud throughout the day, so need every Puppet run to update the metadata for packages, therefore would never have idempotent runs

Possible improvements

  • There should be a $always_update_cache parameter, turned on by default (as to not break this behaviour for people updating the module) that makes it so that the apt-get update and the yum makecache (Suggested by @spuder in Fixing repeated node changes on yumcache by making this a refreshonly #12)
  • For people who use something like run stages for cache updates or only want to use a package that doesn't change that often, the cache updates should have a refreshonly parameter
  • This refreshonly parameter could be a boolean value, taken from $always_update_cache to only run the cache updates if true.
petems added a commit to petems/computology-packagecloud that referenced this issue Jun 8, 2017
* Stops makecache or apt-get update running every 
time, breaking idempotency when you don't require 
a cache update
* false by default, as it would be a breaking 
change for people who use the workflow of updating
a package in CloudPackage and wanting it available
on next Puppet run
* Fixes computology#26
petems added a commit to petems/computology-packagecloud that referenced this issue Jun 8, 2017
* Stops makecache or apt-get update running every 
time, breaking idempotency when you don't require 
a cache update
* false by default, as it would be a breaking 
change for people who use the workflow of updating
a package in CloudPackage and wanting it available
on next Puppet run
* Fixes computology#26
petems added a commit to petems/computology-packagecloud that referenced this issue Jun 8, 2017
* Stops makecache or apt-get update running every 
time, breaking idempotency when you don't require 
a cache update
* false by default, as it would be a breaking 
change for people who use the workflow of updating
a package in CloudPackage and wanting it available
on next Puppet run
* Fixes computology#26
@Yggdrasil
Copy link

Your solution looks good but I would vote to flip the default behaviour, even if that means bumping the major version number. Puppet modules should be idempotent by default and not cause unnecessary resource changes or noise in the reports. So $always_update_cache should be false by default, which matches the behaviour of popular modules like puppetlabs-apt.

People frequently deploying updated packages through Packagecloud could set it to true or instead send a notify to the packagecloud class from another resource. They willingly choose frequent changes so will be expecting it.

Even then, dashboards like Puppetboard and Foreman will keep showing each package list update as a change on each Puppet run whether a package is updated or not, leading to a lot of 'noise'. This happens because it's logged at "notice" level. To eliminate these updates from reports, you could set the loglevel metaparameter to "debug" on the apt_get_update or yum_make_cache resources.

@petems
Copy link
Contributor Author

petems commented Oct 5, 2017

@Yggdrasil Agreed, but I'd rather get the basic behaviour in first, then bump the major and flip the default to be idempotent.

@siebrand
Copy link

siebrand commented Dec 7, 2022

@nethsix Apologies for tagging you out out the blue. You appear to be a person that made a recent change in the computology Github organization (to repo packagecloud-github-action). Many repos here appear to be quite stale, but some are still used, like this one. Do you have any suggestions on how to get things going again?

@nethsix
Copy link

nethsix commented Dec 7, 2022

Hey @siebrand
Depending on the popularity of the integratiion, some may have more activity than others. How can I help?

@siebrand
Copy link

siebrand commented Dec 7, 2022

@nethsix Many thanks for your quick reply! This module hasn't been touched in over 6 years. In the meantime, the world went on. New versions of libraries (see pull requests by dependabot), new versions of Puppet(server); the current is 7, and this module officially supports 3, while even puppet 5 is out of support already. Next to that, there is an idempotency issue and an issue with keys. The latter two are the main reason for people to fork and adjust, I think. The general maintenance might take a couple of hours, too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants