You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure Artifactory with a remote repository targeting PSGallery.
Connect PSResourceGet to this repository. (Because PSGallery is v2-only, the connection to Artifactory within PSResourceGet must also be v2).
Update PSResourceGet with Update-PSResource Microsoft.PowerShell.PSResourceGet.
Expected behavior
PS> Update-PSResource Microsoft.PowerShell.PSResourceGetPS> # update completes without issues
Actual behavior
PS> update-psresource Microsoft.PowerShell.PSResourceGet -Repository Artifactoryupdate-psresource : Package does not exist on the serverAt line:1 char:1+ update-psresource Microsoft.PowerShell.PSResourceGet -Repository Arti ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Microsoft.Power...lets.FindHelper:FindHelper) [Update-PSResource], ResourceNotFoundException + FullyQualifiedErrorId : FindNameConvertToPSResourceFailure,Microsoft.PowerShell.PSResourceGet.Cmdlets.UpdatePSResource
Error details
No response
Environment data
ModuleType Version PreRelease Name ExportedCommands
-----------------------------------------------
Binary 1.0.4.1 Microsoft.PowerShell.PSResourceGet {Find-PSResource,Get-InstalledPSResource,Get-PSResourceRepository,Get-PSScriptFileInfo…}
Name Value
---------
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
This seems to be the combination of two separate issues:
PSResourceGet changes behavior in calls like FindPackageById() if we detect the upstream repo is a JFrog repo. After discussing with JFrog support, they confirmed that NuGet calls like this are being passed unfettered to the upstream. This means that PSGallery is receiving subtly different API call parameters when it's being reflected through Artifactory.
@alerickson@SydneyhSmith This bug isn't something I can directly contribute a fix for since we're running up against [unexpected] behavior in the Gallery.
Can someone from your team take a look here?
We originally engaged JFrog support for this and have some line of dialogue with their R&D. (JFrog folks, see ticket #296792) If we need to get adjustments made in JFrog to align its behavior with other servers (thus obviating the need for quirk flags in this space), now would be an excellent time to do so.
Alternatively, if your team is comfortable with munging the filter (i.e. convert from IsLatestVersion to IsLatestVersion eq true, add a space to the front of the string, etc.), I can cut a PR for that (with the understanding that it will decrease legibility of the codebase).
As mentioned in this issue, we're going to look into the Gallery codebase to see what is happening and if we can't safely make the change there then we'll open a fix client side.
Prerequisites
Steps to reproduce
v2
).Update-PSResource Microsoft.PowerShell.PSResourceGet
.Expected behavior
Actual behavior
Error details
No response
Environment data
Visuals
This seems to be the combination of two separate issues:
FindPackageById()
if we detect the upstream repo is a JFrog repo. After discussing with JFrog support, they confirmed that NuGet calls like this are being passed unfettered to the upstream. This means that PSGallery is receiving subtly different API call parameters when it's being reflected through Artifactory.IsLatestVersion
, is returning unexpected results. I filed filterIsLatestVersion
returns invalid response for packageMicrosoft.PowerShell.PSResourceGet
PowerShellGallery#273 to track this.The text was updated successfully, but these errors were encountered: