You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just ran into an issue where Github failed to serve up a file properly, and that prevented all future runs of my cookbook from converging successfully.
The github_asset resource downloads directly into the destination file (/var/chef/cache/github_assets/org/repo/version/foo-version.tar.gz). If the download fails it leaves a zero-length archive behind with that name, and future cookbook runs don't re-download the file because the zero-length file exists. See https://github.com/reset/github-cookbook/blob/master/libraries/github_asset.rb#L94.
Suggested solution: download to a temporary file and rename it if the download completes successfully. I suggest downloading to a temporary name in the same directory so that the rename step doesn't also require a copy, if (for example) the /tmp directory is on a different volume than the /var/chef/cache/github_assets directory.
Activity
thegreenrobot commentedon Mar 18, 2015
I can confirm seeing the same issue when using this cookbook and it is intermittent.
lancehudson commentedon Dec 30, 2015
I put in a fix for this in #11
Example:
https://github.com/hightail/github-cookbook/blob/d61fcebc6636876bb51c54dfcfcc05fa0c60ccbf/libraries/github_asset.rb#L118