Skip to content
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

Package information cache is case sensitive to the package name. #356

Open
akarzazi opened this issue Jul 31, 2024 · 0 comments
Open

Package information cache is case sensitive to the package name. #356

akarzazi opened this issue Jul 31, 2024 · 0 comments

Comments

@akarzazi
Copy link

akarzazi commented Jul 31, 2024

Describe the Bug

It seems like the package information cache is case sensitive to the package name.

We've observed cache misses in the search for packages when the package name is not fully lower case.

Consider the following sample code, (Assuming all the packages are already installed on the system)

  package { '...': # whatever
    ensure   => '...',
    provider => 'chocolatey',
  }

# mind the upper case 'F' in 'dotnetFx'
  package { 'dotnetFx':  # no cache issue with 'dotnetfx'
    ensure   => '4.8.0.20190930',
    provider => 'chocolatey',
  }

We can confirm this with puppet agent -t --evaltrace

Bad:
[2024-07-31 22:12:59] Info: /Stage[main]/Tsiisweb::Package/Package[webpi]: Starting to evaluate the resource (269 of 463)
[2024-07-31 22:12:59] Info: /Stage[main]/Tsiisweb::Package/Package[webpi]: Evaluated in 0.00 seconds
[2024-07-31 22:12:59] Info: /Stage[main]/Tsiisweb::Package/Package[dotnetFX]: Starting to evaluate the resource (270 of 463)
[2024-07-31 22:13:02] Info: /Stage[main]/Tsiisweb::Package/Package[dotnetFX]: Evaluated in 3.06 seconds

This run yield two logs in chocolatey.log as below, confirming the cache miss.

2024-07-31 22:20:47,195 5484 [DEBUG] - Command line: C:\ProgramData\chocolatey\choco.exe  list -lo -r 
2024-07-31 22:20:47,195 5484 [DEBUG] - Received arguments: list -lo -r

Good:
[2024-07-31 18:26:17] Info: /Stage[main]/Tsiisweb::Package/Package[webpi]: Starting to evaluate the resource (236 of 409)
[2024-07-31 18:26:17] Info: /Stage[main]/Tsiisweb::Package/Package[webpi]: Evaluated in 0.00 seconds
[2024-07-31 18:26:17] Info: /Stage[main]/Tsiisweb::Package/Package[dotnetfx]: Starting to evaluate the resource (237 of 409)
[2024-07-31 18:26:17] Info: /Stage[main]/Tsiisweb::Package/Package[dotnetfx]: Evaluated in 0.00 seconds

Expected Behavior

My guess is that the cache should be case insensitive like the chocolatey provider.

Steps to Reproduce

see description.

Environment

  • Version [8.0.0]
  • Platform [windows]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant