Skip to content

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

Open
@akarzazi

Description

@akarzazi

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]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions