github asset download force does not force
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start at the github_asset resource's handling of action :download and force true, then compare the requested behavior with remote_file and archive_file in the example. Check how the asset path is currently derived from Chef::Config['file_cache_path']. Done means downloads can be forced for updated assets and the resource exposes a usable download location or clearly documents the supported behavior.
Written by the indexing model from the issue text.
Description
Probably a documentation bug:
Setting force to true only has an effect when the action is extract
The desired behaviour however is to force downloading the asset, since in our case the assets get updated. The ideal solution for my use case would be a similar behaviour as remote_file, which can notify if the asset has changed. My current workaround is this:
Also it would be great if the download location could be read from the resource, such as asset.file_path, or alike.
asset = github_asset 'frontend.tar.gz' do
github_user 'axos88'
github_token EncryptedCache.fetch('doorlock_github_token')
owner 'www-data'
group 'www-data'
repo 'org/project'
release 'vLatest'
action :download
force true
end
frontend_path = File.join(Chef::Config['file_cache_path'], 'project-frontend.tar.gz')
remote_file frontend_path do
source "file://#{Chef::Config['file_cache_path']}/github_assets/org/project/vLatest/frontend.tar.gz" #TODO: Extract path from resource definition.
notifies :extract, "archive_file[#{frontend_path}]", :immediately
end
- Dominant language
- Ruby
- Stars
- 25
- Forks
- 25
- Avg merge
- 5h 40m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sous-chefs/github
-
Feature Request
Difficulty 3/5 1-2 days Newbie friendliness 45/100
sous-chefs/github#47 ·
-
Dependency Dashboard Open
Difficulty 1/5 Under an hour Newbie friendliness 15/100
sous-chefs/github#26 ·
-
Feature Request
Difficulty 5/5 Over a week Newbie friendliness 25/100
sous-chefs/github#19 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
sous-chefs/github#9 · 2 comments ·
All issues in sous-chefs/github
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100