sous-chefs / elasticsearch

Development repository for the elasticsearch cookbook
https://supermarket.chef.io/cookbooks/elasticsearch
Other
881 stars 599 forks source link

Fix install package to work with custom download_checksum #795

Closed tschroeder-zendesk closed 11 months ago

tschroeder-zendesk commented 11 months ago

Description

Fix install package to work with custom download_checksum. Currently you cannot specify the download_url or download_checksum so you cannot install newer versions then what already exists!

Issues Resolved

List any existing issues this PR resolves

Check List

tschroeder-zendesk commented 11 months ago

Fixed so testing works and cookbook works with or without url/checksum defined. It seems new_resource doesn't exist for download_url or download_checksum unless they are defined, so it uses the old code when they are indeed undefined. This allows for actual override instead of getting an error of "Unsupported version" when you define for example just a download_checksum or both as that was a non-working case prior to this change.

tschroeder-zendesk commented 11 months ago

Okay... so finally found the root of the real issue. It was referencing the values in the defaults incorrectly causing issues. It also should be using new_resource always for the install_package. I have tested this with a bunch of value combinations and it should be good to go now.

kitchen-porter commented 11 months ago

Released as: 5.1.10

damacus commented 11 months ago

Excellent, thank you!