Repository navigation
Nuget v2 using lowerCaseId which 404s #2145
Copy link
Copy link
Open
Labels
Description
Description
It seems like paket is trying to always use the <lowerCaseId> when resolving Nuget v2 packages.
Repro steps
This is using Artifactory's implementation of NuGet
- GET
https://artifact.foo.com/artifactory/api/nuget/nuget/FindPackagesById()?id='pester' - Which returns:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom" xml:base="https://artifact.foo.com/artifactory/api/nuget/nuget/">
<title type="text"></title>
<id>http://schemas.datacontract.org/2004/07/</id>
<updated>2017-02-16T22:45:20Z</updated>
<link rel="self" title="FindPackagesById" href="FindPackagesById"/>
<entry>
<id>https://artifact.foo.com/artifactory/api/nuget/nuget/Packages(Id='Pester',Version='3.4.0')</id>
<title type="text">Pester</title>
<summary type="text">Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of powershell code being tested. Pester tests can execute any command or script that is accesible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system.</summary>
<updated>2016-11-27T17:32:42Z</updated>
<author>
<name>Pester Team</name>
</author>
<link rel="edit" title="V2FeedPackage" href="Packages(Id='Pester',Version='3.4.0')"/>
<link rel="self" title="V2FeedPackage" href="Packages(Id='Pester',Version='3.4.0')"/>
<category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<content type="application/zip" src="https://artifact.foo.com/artifactory/api/nuget/nuget/Download/Pester/3.4.0"/>
<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:lastUpdated>2016-11-27T17:32:42</d:lastUpdated>
<d:Version>3.4.0</d:Version>
<d:Created m:type="Edm.DateTime">2016-08-15T11:53:32</d:Created>
<d:Dependencies></d:Dependencies>
<d:Description>Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of powershell code being tested. Pester tests can execute any command or script that is accesible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system.</d:Description>
<d:DownloadCount m:type="Edm.Int32">0</d:DownloadCount>
<d:IconUrl>http://pesterbdd.com/images/Pester.png</d:IconUrl>
<d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion>
<d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion>
<d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
<d:Language m:null="true"/>
<d:Published m:type="Edm.DateTime">2016-08-15T11:53:32</d:Published>
<d:LicenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</d:LicenseUrl>
<d:PackageHash>RrGZm7eITJ/8AKwEs0O+uAc2McSz16b4Lkw/X8/rPtoptUmMmJCLevjwRTqKtyJowieE+04Sh5ArKHJVHZegbg==</d:PackageHash>
<d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
<d:PackageSize m:type="Edm.Int64">121686</d:PackageSize>
<d:ProjectUrl>https://github.com/Pester/Pester</d:ProjectUrl>
<d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
<d:Tags>powershell unit testing bdd tdd mocking admin</d:Tags>
<d:Title>Pester</d:Title>
<d:VersionDownloadCount m:type="Edm.Int32">0</d:VersionDownloadCount>
<d:Authors>Pester Team</d:Authors>
<d:MinClientVersion m:null="true"/>
<d:Summary>A BDD style testing tool for Powershell</d:Summary>
</m:properties>
</entry>
</feed>
- which should lead to
https://artifact.foo.com/artifactory/api/nuget/nuget/Packages(Id='Pester',Version='3.4.0')
3b) however paket tries to usehttps://artifact.foo.com/artifactory/api/nuget/nuget/Packages(Id='pester',Version='3.4.0')
Looking at the correct metadata, perhaps paket is walking the <lowerCaseId>?
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xml:base="https://artifact.foo.com/artifactory/api/nuget/nuget-local/">
<id>https://artifact.foo.com/artifactory/api/nuget/nuget-local/Packages(Id='Pester',Version='3.4.0')</id>
<lowerCaseId>https://artifact.foo.com/artifactory/api/nuget/nuget-local/packages(id='pester',version='3.4.0')</lowerCaseId>
<title type="text">Pester</title>
<summary type="text">Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of powershell code being tested. Pester tests can execute any command or script that is accesible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system.</summary>
<updated>2016-11-27T17:32:42Z</updated>
<author>
<name>Pester Team</name>
</author>
<link rel="edit" title="V2FeedPackage" href="Packages(Id='Pester',Version='3.4.0')"/>
<link rel="self" title="V2FeedPackage" href="Packages(Id='Pester',Version='3.4.0')"/>
<category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<content type="application/zip" src="https://artifact.foo.com/artifactory/api/nuget/nuget/Download/Pester/3.4.0"/>
<m:properties xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices">
<d:lastUpdated>2016-11-27T17:32:42</d:lastUpdated>
<d:Version>3.4.0</d:Version>
<d:Created m:type="Edm.DateTime">2016-08-15T11:53:32</d:Created>
<d:Dependencies></d:Dependencies>
<d:Description>Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of powershell code being tested. Pester tests can execute any command or script that is accesible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system.</d:Description>
<d:DownloadCount m:type="Edm.Int32">0</d:DownloadCount>
<d:IconUrl>http://pesterbdd.com/images/Pester.png</d:IconUrl>
<d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion>
<d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion>
<d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
<d:Language m:null="true"/>
<d:Published m:type="Edm.DateTime">2016-08-15T11:53:32</d:Published>
<d:LicenseUrl>http://www.apache.org/licenses/LICENSE-2.0.html</d:LicenseUrl>
<d:PackageHash>RrGZm7eITJ/8AKwEs0O+uAc2McSz16b4Lkw/X8/rPtoptUmMmJCLevjwRTqKtyJowieE+04Sh5ArKHJVHZegbg==</d:PackageHash>
<d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
<d:PackageSize m:type="Edm.Int64">121686</d:PackageSize>
<d:ProjectUrl>https://github.com/Pester/Pester</d:ProjectUrl>
<d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
<d:Tags>powershell unit testing bdd tdd mocking admin</d:Tags>
<d:Title>Pester</d:Title>
<d:VersionDownloadCount m:type="Edm.Int32">0</d:VersionDownloadCount>
<d:Authors>Pester Team</d:Authors>
<d:MinClientVersion m:null="true"/>
<d:Summary>A BDD style testing tool for Powershell</d:Summary>
</m:properties>
</entry>
Expected behavior
Behave like nuget.exe when parsing v2 metadata
Actual behavior
Package not available.
Message: Couldn't get package details for package pester 3.4.0 on https:
//artifact.foo.com/artifactory/api/nuget/nuget.
Known workarounds
none
Reactions are currently unavailable
Activity
forki commentedon Feb 17, 2017
are you using latest artifactory version?
Add a workaround for #2145
forki commentedon Feb 17, 2017
can you please try latest version with workaround?
jdkang commentedon Feb 20, 2017
I will try the workaround when I'm back at work (with Artifactory).
I should note that it worked "as expected" when I capitalized the first character in the
paket.depdendenciesentry (Pestervspester) -- even though the metadata returned indicates a capitalized string