skybrud / Skybrud.Umbraco.Redirects.Import

Import and export addon for Skybrud.Umbraco.Redirects.
MIT License
7 stars 11 forks source link

V10 to v13 updates fails when Skybrud Redirects 13 installed #32

Closed bielu closed 8 months ago

bielu commented 8 months ago

Which version of Skybrud Redirects are you using? (Please write the exact version, example: 4.0.8)

13.0.0

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

13.0.3

Bug description

When updating one of projects to v13, I hit issue where skybrud redirects import would try to read from nucache before update is finished ending up with death lock on nucache and broken db :)

In spare tim I will try prepare reproduction example and send it here.

abjerner commented 8 months ago

@bielu this isn't a lot of information. You wouldn't happen to have a stack trace or any related information that could help debugging this?

You mention this is caused by Skybrud Redirects Import, which is a different package and a different repo. I can't think if why this would try to read from the cache during upgrades. It should only really to anything when triggered by the user through the backoffice.

Skybrud Redirects on the other hand may save a backup of all redirects before making changes to it's table in the database. But IIRC this would only be the case if those migrations haven't already run, and the Umbraco 13 package shouldn't introduce any new migrations. So your upgrade path could likely matter a lot. So what version of Umbraco did you try to upgrade from? And what versions of Skybrud Redirects and Skybrud Redirects Import?

bielu commented 8 months ago

Hey @abjerner! sorry for wrong repo I was sure i opened it in correct one! I upgraded from 10.8.3 to 13.0.3, and it was failing on nucache lock, i saw just namespace of package and remove it and it went sucessfully, and later instalation of redirect import didnt cause any issues. As said I will prepare you example project and potentially provide fix for it when will have spare 5 :) Can you maybe move this issue to correct repo?

bjarnef commented 8 months ago

@bielu not sure if this is related to Skybrud Redirects package, but I had this NuCache lock error while migrating a project wihtout Skybrud Redirects: https://github.com/umbraco/Umbraco-CMS/issues/15634

To me it was solved by setting "ShowMaintenancePageWhenInUpgradeState": true.

bielu commented 8 months ago

@bjarnef we have it enabled, so it is not same issue sadly, I still need find few minutes to create example 😓

bielu commented 8 months ago

I can't reproduce it in reliable way, going to close, as workaround was simple to remove package and add it post update. but yeah it happens sometimes not always 😕

abjerner commented 8 months ago

It would still be nice with a stack trace to get some more insights into the error. I can't think of anything in Skybrud Redirects Import that will cause this. A stack trace could help confirm or rule out various things.

In the ASP.NET Core request pipeline one middleware will call the next middleware and so forth, so in some situations you'll see all the middleware listed in the stack trace. Skybrud Redirects Import doesn't have a middleware though, but Skybrud Redirects does. This means that you could likely see Skybrud.Umbraco.Redirects.Middleware.RedirectsMiddleware mentioned in a stack trace even though the exception has nothing do to with my package.