Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Migration of feed fails hard



  • Trying to upgrade a feed:
    This feed uses the ProGet 4.0 schema for NuGet package metadata. It will continue to work indefinitely, but does not support Semantic Versioning 2.0, which recent versions of the NuGet client support.

    The upgrade fails because of pretty clear error, Null constraint, but that should not happen - right?
    Seems like the upgrade script is not taking care of all the possible scenarios.
    Any suggestions as to how to proceed?

    Error:

    Beginning database transaction...
    Database transaction created.
    Gathering list of packages in feed...
    Found 1642 packages.
    Migrating packages...
    Migrating ABCpdf 10.1.0.8...
    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 that a COMMIT or ROLLBACK TRANSACTION statement is missing. 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:dec39986-dc1e-4dcf-9d29-646f03280442
    Error Number:50000,State:42,Class:16
    

    Product: ProGet
    Version: 5.0.7



  • Your analysis is correct - 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

    We should have a maintenance release out to address this by early next week.



  • Hi Tod
    Thanks for the fast response.

    Since i am not relying on the statistics of Proget i have solved the issue with a bit of work.

    • Created new feed that uses new standards
    • setup custom feedpath and droppackage path for bulk import
    • on the server i located that packages on the filesystem and dumped into the appropiate bulk import folder.
    • wait a minute or two and the new feed has all the packages.
    • Rename feeds so the new one has the name of the old deprecated.

    It is a workaround but it works but again - you loose statistics.
    Symbols and Source seem to survive :-D



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation