Connect PSResourceGet to an Artifactory NuGet feed, with a feed URL like so: https://artifactory.f.q.d.n/artifactory/api/nuget/v2/<feed-name>/
Run Find-PSResource -Type Module -Repository Artifactory (or `Find-PSResource -Name '*' -Repository Artifactory, with fixes from #1526)
Expected behavior
All modules (or modules+scripts) are retrieved from the feed
Actual behavior
No content is retrieved from the feed
Error details
No error message
Environment data
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Binary 1.0.1 Microsoft.PowerShell.PSResourceGet {Find-PSResource, Get-InstalledPSResource, Get-PSResourceR...
Key : PSVersion
Value : 5.1.19041.3803
Name : PSVersion
Key : PSEdition
Value : Desktop
Name : PSEdition
Key : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0...}
Name : PSCompatibleVersions
Key : BuildVersion
Value : 10.0.19041.3803
Name : BuildVersion
Key : CLRVersion
Value : 4.0.30319.42000
Name : CLRVersion
Key : WSManStackVersion
Value : 3.0
Name : WSManStackVersion
Key : PSRemotingProtocolVersion
Value : 2.3
Name : PSRemotingProtocolVersion
Key : SerializationVersion
Value : 1.1.0.1
Name : SerializationVersion
When Find-Module enumerates a v2 feed, the underlying API call(s) (as identified by using -Debug) looks like this:
https://artifactory.f.q.d.n/artifactory/api/nuget/v2/psgallery-nuget-local/Search()?$filter=IsLatestVersion&searchTerm=''&targetFramework=''&includePrerelease=false&$skip=0&$top=40
When Find-PSResource enumerates a v2 feed, the API call looks like this:
'https://artifactory.f.q.d.n/artifactory/api/nuget/v2/psgallery-nuget-local/Search()?$filter=IsLatestVersion&$orderby=Id desc&$inlinecount=allpages&$skip=0&$top=6000'
I see three differences in the OData parameters:
Pagination parameters are different (window of 6000 with PSResourceGet instead of 40 on PSGet)
PSResourceGet requests sorting, PSGet did not
No search query is provided (PSGet passes an empty search term - searchTerm='')
When I try manually performing the REST calls from PSResourceGet myself, I see that Artifactory is indeed returning a response with no results:
Upon adding searchTerm='', I get the expected response:
Prerequisites
Steps to reproduce
(Related to #1485 and #1526 - spinning off a separate issue at the request of @alerickson in https://github.com/PowerShell/PSResourceGet/issues/1485#issuecomment-1897197544)
https://artifactory.f.q.d.n/artifactory/api/nuget/v2/<feed-name>/
Find-PSResource -Type Module -Repository Artifactory
(or `Find-PSResource -Name '*' -Repository Artifactory, with fixes from #1526)Expected behavior
Actual behavior
Error details
Environment data
Visuals
From https://github.com/PowerShell/PSResourceGet/issues/1485#issuecomment-1821859922: