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

Convert-from-nuget modifies package versions X.Y.0 to X.Y #1591

Closed
Vilmir opened this Issue Apr 11, 2016 · 17 comments

Comments

Projects
None yet
3 participants
@Vilmir

Vilmir commented Apr 11, 2016

Description

When converting a codebase from NuGet to Paket using the command convert-with-paket, the process does modify package versions formed as X.Y.0 to X.Y
This causes no problem when the nuget source is nuget.org, but with Artifactory pro, the restore fails to find version X.Y, while X.Y.0 exists

Repro steps

  1. Using repository https://github.com/Vilmir/ReproPaketMigrationVersionConversion
  2. Run a paket.exe convert-from-nuget command

Expected behavior

Paket shall pin EntityFramework to 6.1.0

Actual behavior

Paket will pin EntityFramework to version 6.1

Resolving packages for group Main:
 - EntityFramework is pinned to 6.1

Restore fails if the nuget source is Artifactory - I cannot share our Artifactory server for repro, it is only available from our Intranet

Known workarounds

I haven't found a workaround.
I have tried to run convert-from-nuget --no-install --no-auto-restore and then modify the version in paket.dependencies to 6.1.0, but the restore still fails, trying to look for 6.1

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

Are you talking about the versions in the dependencies file? Can you manually add the 0 and check if install works then?

Member

forki commented Apr 11, 2016

Are you talking about the versions in the dependencies file? Can you manually add the 0 and check if install works then?

@forki forki added the bug label Apr 11, 2016

@cdrnet

This comment has been minimized.

Show comment
Hide comment
@cdrnet

cdrnet Apr 11, 2016

Member

When running verbose:

Downloading EntityFramework 6.1
  to C:\Users\myuser\AppData\Local\NuGet\Cache\EntityFramework.6.1.0.nupkg
Response from https://myserver/artifactory/api/nuget/myfeed/Packages(Id='EntityFramework',Version='6.1'):

<?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://myserver/artifactory/api/nuget/myfeed/">
  <id>https://myserver/artifactory/api/nuget/myfeed/Packages(Id='EntityFramework',Version='6.1.0')</id>
  <lowerCaseId>https://myserver/artifactory/api/nuget/myfeed/packages(id='entityframework',version='6.1.0')</lowerCaseId>
  <title type="text">EntityFramework</title>
  <summary type="text">Entity Framework is Microsoft's recommended data access technology for new applications.</summary>
  <updated>2015-10-09T16:15:27Z</updated>
  <author>
    <name>Microsoft</name>
  </author>
  <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='EntityFramework',Version='6.1.0')"/>
  <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='EntityFramework',Version='6.1.0')"/>
  <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
  <content type="application/zip" src="https://myserver/artifactory/api/nuget/myfeed/Download/EntityFramework/6.1.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:Version>6.1.0</d:Version>
    <d:NormalizedVersion>6.1.0</d:NormalizedVersion>
    <d:LastEdited>
      <iMillis>0</iMillis>
    </d:LastEdited>
    <d:LicenseReportUrl></d:LicenseReportUrl>
    <d:LicenseNames></d:LicenseNames>
    <d:Copyright></d:Copyright>
    <d:Created m:type="Edm.DateTime">2014-03-17T21:38:19.813</d:Created>
    <d:Dependencies></d:Dependencies>
    <d:Description>Entity Framework is Microsoft's recommended data access technology for new applications.</d:Description>
    <d:DownloadCount m:type="Edm.Int32">17030853</d:DownloadCount>
    <d:GalleryDetailsUrl>https://www.nuget.org/packages/EntityFramework/6.1.0</d:GalleryDetailsUrl>
    <d:IconUrl>http://go.microsoft.com/fwlink/?LinkID=386613</d:IconUrl>
    <d:IsLatestVersion m:type="Edm.Boolean">false</d:IsLatestVersion>
    <d:IsAbsoluteLatestVersion m:type="Edm.Boolean">false</d:IsAbsoluteLatestVersion>
    <d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
    <d:Language>en-US</d:Language>
    <d:Published m:type="Edm.DateTime">2014-03-17T21:38:19.877</d:Published>
    <d:LicenseUrl>http://go.microsoft.com/fwlink/?LinkID=320539</d:LicenseUrl>
    <d:PackageHash>u/M0OEfqxTUsL5BwzD66eBGm278/ozqdLK3JvMO6QwUxxc+z7ZUkTYm4suDhWRqzkc6mOhvXDQY5dZUwbldxyQ==</d:PackageHash>
    <d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
    <d:PackageSize m:type="Edm.Int64">12653</d:PackageSize>
    <d:ProjectUrl>http://go.microsoft.com/fwlink/?LinkID=320540</d:ProjectUrl>
    <d:ReportAbuseUrl>https://www.nuget.org/package/ReportAbuse/EntityFramework/6.1.0</d:ReportAbuseUrl>
    <d:ReleaseNotes></d:ReleaseNotes>
    <d:RequireLicenseAcceptance m:type="Edm.Boolean">true</d:RequireLicenseAcceptance>
    <d:Tags>Microsoft EF Database Data O/RM ADO.NET</d:Tags>
    <d:Title>EntityFramework</d:Title>
    <d:VersionDownloadCount m:type="Edm.Int32">1213369</d:VersionDownloadCount>
    <d:Authors>Microsoft</d:Authors>
    <d:MinClientVersion></d:MinClientVersion>
    <d:Summary>Entity Framework is Microsoft's recommended data access technology for new applications.</d:Summary>
  </m:properties>
</entry>
Downloading license for EntityFramework 6.1 to C:\Users\myuser\AppData\Local\NuGet\Cache\EntityFramework.6.1.0.license.html
Something went wrong while downloading EntityFramework 6.1
Message: Could not download EntityFramework 6.1 from https://myserver/artifactory/api/nuget/myfeed/Download/EntityFramework/6.1.0.
    The remote server returned an error: (404) Not Found.

Member

cdrnet commented Apr 11, 2016

When running verbose:

Downloading EntityFramework 6.1
  to C:\Users\myuser\AppData\Local\NuGet\Cache\EntityFramework.6.1.0.nupkg
Response from https://myserver/artifactory/api/nuget/myfeed/Packages(Id='EntityFramework',Version='6.1'):

<?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://myserver/artifactory/api/nuget/myfeed/">
  <id>https://myserver/artifactory/api/nuget/myfeed/Packages(Id='EntityFramework',Version='6.1.0')</id>
  <lowerCaseId>https://myserver/artifactory/api/nuget/myfeed/packages(id='entityframework',version='6.1.0')</lowerCaseId>
  <title type="text">EntityFramework</title>
  <summary type="text">Entity Framework is Microsoft's recommended data access technology for new applications.</summary>
  <updated>2015-10-09T16:15:27Z</updated>
  <author>
    <name>Microsoft</name>
  </author>
  <link rel="edit" href="https://www.nuget.org/api/v2/Packages(Id='EntityFramework',Version='6.1.0')"/>
  <link rel="self" href="https://www.nuget.org/api/v2/Packages(Id='EntityFramework',Version='6.1.0')"/>
  <category term="NuGetGallery.OData.V2FeedPackage" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
  <content type="application/zip" src="https://myserver/artifactory/api/nuget/myfeed/Download/EntityFramework/6.1.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:Version>6.1.0</d:Version>
    <d:NormalizedVersion>6.1.0</d:NormalizedVersion>
    <d:LastEdited>
      <iMillis>0</iMillis>
    </d:LastEdited>
    <d:LicenseReportUrl></d:LicenseReportUrl>
    <d:LicenseNames></d:LicenseNames>
    <d:Copyright></d:Copyright>
    <d:Created m:type="Edm.DateTime">2014-03-17T21:38:19.813</d:Created>
    <d:Dependencies></d:Dependencies>
    <d:Description>Entity Framework is Microsoft's recommended data access technology for new applications.</d:Description>
    <d:DownloadCount m:type="Edm.Int32">17030853</d:DownloadCount>
    <d:GalleryDetailsUrl>https://www.nuget.org/packages/EntityFramework/6.1.0</d:GalleryDetailsUrl>
    <d:IconUrl>http://go.microsoft.com/fwlink/?LinkID=386613</d:IconUrl>
    <d:IsLatestVersion m:type="Edm.Boolean">false</d:IsLatestVersion>
    <d:IsAbsoluteLatestVersion m:type="Edm.Boolean">false</d:IsAbsoluteLatestVersion>
    <d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
    <d:Language>en-US</d:Language>
    <d:Published m:type="Edm.DateTime">2014-03-17T21:38:19.877</d:Published>
    <d:LicenseUrl>http://go.microsoft.com/fwlink/?LinkID=320539</d:LicenseUrl>
    <d:PackageHash>u/M0OEfqxTUsL5BwzD66eBGm278/ozqdLK3JvMO6QwUxxc+z7ZUkTYm4suDhWRqzkc6mOhvXDQY5dZUwbldxyQ==</d:PackageHash>
    <d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
    <d:PackageSize m:type="Edm.Int64">12653</d:PackageSize>
    <d:ProjectUrl>http://go.microsoft.com/fwlink/?LinkID=320540</d:ProjectUrl>
    <d:ReportAbuseUrl>https://www.nuget.org/package/ReportAbuse/EntityFramework/6.1.0</d:ReportAbuseUrl>
    <d:ReleaseNotes></d:ReleaseNotes>
    <d:RequireLicenseAcceptance m:type="Edm.Boolean">true</d:RequireLicenseAcceptance>
    <d:Tags>Microsoft EF Database Data O/RM ADO.NET</d:Tags>
    <d:Title>EntityFramework</d:Title>
    <d:VersionDownloadCount m:type="Edm.Int32">1213369</d:VersionDownloadCount>
    <d:Authors>Microsoft</d:Authors>
    <d:MinClientVersion></d:MinClientVersion>
    <d:Summary>Entity Framework is Microsoft's recommended data access technology for new applications.</d:Summary>
  </m:properties>
</entry>
Downloading license for EntityFramework 6.1 to C:\Users\myuser\AppData\Local\NuGet\Cache\EntityFramework.6.1.0.license.html
Something went wrong while downloading EntityFramework 6.1
Message: Could not download EntityFramework 6.1 from https://myserver/artifactory/api/nuget/myfeed/Download/EntityFramework/6.1.0.
    The remote server returned an error: (404) Not Found.

@cdrnet

This comment has been minimized.

Show comment
Hide comment
@cdrnet

cdrnet Apr 11, 2016

Member

Actual error from artifactory:

{
  "errors" : [ {
    "status" : 404,
    "message" : "my-source-name: Error in getting information for 'EntityFramework.6.1.0.nupkg' (Failed retrieving resource from https://www.nuget.org/api/v2/package/EntityFramework/6.1.0: Connect to api.nuget.org:443 [api.nuget.org/93.184.221.200] failed: Connection refused: connect)."
  } ]
}

Sounds actually more like an issue beween artifactory and public nuget to me.

Member

cdrnet commented Apr 11, 2016

Actual error from artifactory:

{
  "errors" : [ {
    "status" : 404,
    "message" : "my-source-name: Error in getting information for 'EntityFramework.6.1.0.nupkg' (Failed retrieving resource from https://www.nuget.org/api/v2/package/EntityFramework/6.1.0: Connect to api.nuget.org:443 [api.nuget.org/93.184.221.200] failed: Connection refused: connect)."
  } ]
}

Sounds actually more like an issue beween artifactory and public nuget to me.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

@cdrnet this is a known issue with many custom servers. Paket tries to work around that - seems we missed a spot.

Member

forki commented Apr 11, 2016

@cdrnet this is a known issue with many custom servers. Paket tries to work around that - seems we missed a spot.

@cdrnet

This comment has been minimized.

Show comment
Hide comment
@cdrnet

cdrnet Apr 11, 2016

Member

How can it work around that?
I see in verbose that Paket tried 3 times against the same URI, all failing with 404.

Member

cdrnet commented Apr 11, 2016

How can it work around that?
I see in verbose that Paket tried 3 times against the same URI, all failing with 404.

@Vilmir

This comment has been minimized.

Show comment
Hide comment
@Vilmir

Vilmir Apr 11, 2016

@forki I have tried as specified in the workaround session to add the trailing 0, but the paket restore afterwards still tries to fetch 6.1
I have tried to debug in Paket, but I failed to find out where the 6.1.0 becomes 6.1

If you guys know a workaround, I could even use a custom build of Paket to migrate our remaining codebases.

Vilmir commented Apr 11, 2016

@forki I have tried as specified in the workaround session to add the trailing 0, but the paket restore afterwards still tries to fetch 6.1
I have tried to debug in Paket, but I failed to find out where the 6.1.0 becomes 6.1

If you guys know a workaround, I could even use a custom build of Paket to migrate our remaining codebases.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

I'm already working on a fix. Hope to release in next half hour

Member

forki commented Apr 11, 2016

I'm already working on a fix. Hope to release in next half hour

@Vilmir

This comment has been minimized.

Show comment
Hide comment
@Vilmir

Vilmir Apr 11, 2016

@forki you are more reactive than a premium gold support!

Vilmir commented Apr 11, 2016

@forki you are more reactive than a premium gold support!

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

@cdrnet what is the version that you see in the lock file?

Member

forki commented Apr 11, 2016

@cdrnet what is the version that you see in the lock file?

@cdrnet

This comment has been minimized.

Show comment
Hide comment
@cdrnet

cdrnet Apr 11, 2016

Member
  specs:
    EntityFramework (6.1)
Member

cdrnet commented Apr 11, 2016

  specs:
    EntityFramework (6.1)
@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

if you manually fix that, does it restore correctly?

if you fix the versions in deps file and run update again, does it fix the lock file?

Member

forki commented Apr 11, 2016

if you manually fix that, does it restore correctly?

if you fix the versions in deps file and run update again, does it fix the lock file?

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

I pushed a fix that would create the deps file with 6.1.0 instead of 6.1
But since I don't have artifcatory I'm not sure if this is enough.

Member

forki commented Apr 11, 2016

I pushed a fix that would create the deps file with 6.1.0 instead of 6.1
But since I don't have artifcatory I'm not sure if this is enough.

@cdrnet

This comment has been minimized.

Show comment
Hide comment
@cdrnet

cdrnet Apr 11, 2016

Member

With v2.58.11.0:

A) No. It now does a lookup for 6.1.0 instead of 6.1, but that results in the same atom feed reply containing the same download URI (6.1.0) which still fails with 404.

B) Yes, it updates the lock file to 6.1.0, but then still fails with 404.

Member

cdrnet commented Apr 11, 2016

With v2.58.11.0:

A) No. It now does a lookup for 6.1.0 instead of 6.1, but that results in the same atom feed reply containing the same download URI (6.1.0) which still fails with 404.

B) Yes, it updates the lock file to 6.1.0, but then still fails with 404.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

lol so I fixed completely wrong place ;-)
what should we do?

Member

forki commented Apr 11, 2016

lol so I fixed completely wrong place ;-)
what should we do?

@Vilmir

This comment has been minimized.

Show comment
Hide comment
@Vilmir

Vilmir Apr 11, 2016

I have just tested 2.58.12 and it does resolve the convert with Artifactory as a source.

Thanks!!!

Vilmir commented Apr 11, 2016

I have just tested 2.58.12 and it does resolve the convert with Artifactory as a source.

Thanks!!!

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki Apr 11, 2016

Member

So conversion is good but you still see wrong download url from
artifactory? Sound like an artifactory bug then
On Apr 11, 2016 14:11, "Miguel Vazquez" notifications@github.com wrote:

I have just tested 2.58.12 and it does resolve the convert with
Artifactory as a source.

Thanks!!!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1591 (comment)

Member

forki commented Apr 11, 2016

So conversion is good but you still see wrong download url from
artifactory? Sound like an artifactory bug then
On Apr 11, 2016 14:11, "Miguel Vazquez" notifications@github.com wrote:

I have just tested 2.58.12 and it does resolve the convert with
Artifactory as a source.

Thanks!!!


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1591 (comment)

@cdrnet

This comment has been minimized.

Show comment
Hide comment
@cdrnet

cdrnet Apr 11, 2016

Member

Yes, this seems to be a weird Artifactory issue, not directly related by the original issue and Paket (NPE actually crashes when trying to download that particular version).

Member

cdrnet commented Apr 11, 2016

Yes, this seems to be a weird Artifactory issue, not directly related by the original issue and Paket (NPE actually crashes when trying to download that particular version).

@forki forki closed this Apr 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment