New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

powershell_package_source: Package Source does not register when name_property and source_name are both provided and differ #7883

Open
stuartpreston opened this Issue Nov 6, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@stuartpreston
Member

stuartpreston commented Nov 6, 2018

Description

powershell_package_source doesn't register the source, and doesn't show an error when the name_property and the source_name differ. This makes it look like an idempotency issue but actually the resource does not function as expected in the first place. Needs investigation.

Chef Version

15 (master)
14.6.37

Platform Version

Windows 2016

Replication Case

powershell_package_source 'register test-chocolatey source' do
  source_name 'test-chocolatey'
  url 'http://chocolatey.org/api/v2'
  trusted true
end

Client Output

C:\projects\chef\chef [master ≡]> bundle exec chef-apply c:\repro.rb
Recipe: (chef-apply cookbook)::(chef-apply recipe)
  * powershell_package_source[register test-chocolatey source] action register
    - register source: test-chocolatey
C:\projects\chef\chef [master ≡]> Get-PackageSource

Name                             ProviderName     IsTrusted  Location
----                             ------------     ---------  --------
PSGallery                        PowerShellGet    True       https://www.powershellgallery.com/api/v2

C:\projects\chef\chef [master ≡]> bundle exec chef-apply c:\repro.rb
Recipe: (chef-apply cookbook)::(chef-apply recipe)
  * powershell_package_source[register test-chocolatey source] action register
    - update register test-chocolatey source
    -   set url     to "http://chocolatey.org/api/v2" (was "not_set")
    -   set trusted to true (was false)

Stacktrace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment