Ask A Question

View Question

We cannot migrate any of our legacy NuGet (Quirks) feeds to the new ProGet 5 format from the UI.

It gives the following error in the log:

ERROR: Unhandled exception: System.Data.SqlClient.SqlException (0x80131904): 515`16`2`NuGetPackagesV2_CreateOrUpdatePackage`82`Cannot insert the value NULL into column 'PackageHash_SHA1_Bytes', table 'ProGet.dbo.NuGetPackageVersionsV2'; column does not allow nulls. INSERT fails.
Transaction count after EXECUTE indicates a mismatching number of BEGIN and COMMIT statements. Previous count = 1, current count = 0.
   at System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__174_0(Task`1 result)
   at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Inedo.Data.DatabaseContext.DbResult.<CreateAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Inedo.Data.DatabaseContext.<ExecuteInternalAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Inedo.Data.DatabaseContext.<ExecuteNonQueryAsync>d__31.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Inedo.ProGet.Executions.MigrateNuGetFeedExecution.<ExecuteAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Inedo.ProGet.Service.Executions.ActiveManualExecution.<ExecuteAsync>d__7.MoveNext()
ClientConnectionId:a6aa3ce8-b50b-4e50-a1a0-0199cb5850c7
Error Number:50000,State:42,Class:16

Product: ProGet
Version: 5.0.7

The issue is related to packages missing SHA1 hashes in the ProGet databases; at some point packages were able to be added without them. We have updated the migration process internally to perform them if they are missing, and this fix will be included in the next maintenance release. Here is the tracking issue:

https://inedo.myjetbrains.com/youtrack/issue/PG-1203

Answer Question