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
Could not find a datatype with identifier xxxx #157
Comments
Hi @HalldorLyngmo, Thank you for reaching out 😄 We're going to dig into this as soon as we can - it's been added to our backlog. |
I've spent some time looking into this, and I've found out what's happening, and how you can reproduce this issue manually, unfortunately. However, this is actually an issue in deploy, and not something we can fix in the CMS. This is gonna be a bit long, but this was a tricky one to nail down the cause of. The issue stems from deploy suppressing notifications during deployment, and then later "playing them back" once the deployment is done. The reproduction steps are key to understanding why this happens so here they are: You will need a site with deploy that has:
On cloud:
This will cause deploy to blow up, but only sometimes. What's happening is that deploy will suppress notifications, and then do all the database updates/creates to the datatypes and then start publishing notifications for the cache afterwards. Occasionally deploy will then publish the cache update notification for the updated data type first, not the created one, and this makes everything explode. This happens because when the notification is published for the updated data type, we'll first update that data type in the published data type cache, and as expected, we're all happy. Next, we'll update the data type in the Now updating the content type in the content type cache involves updating it from the database, which happens here, when getting this update content type from the database, we'll also get all the updated composition property types, which now includes the new data type we added in step 6... And this is exactly why this blows up because after we've gotten the updated content type we need to make this into a So the TL;DR issue: Deploy attempts to update a data type (and therefore content types), before having added the necessary dependencies. What can be doneNow I'm no deploy expert by any means, so ultimately this is up to the deploy team, but a possible way to solve this could be to ensure that all saved and deleted notifications are grouped together into a single notification instead of multiple and then published, this would mean that all data types would be updated in the data type cache first before we start looking at updating the content store, this would have the added benefit that it should be more performant. One thing worth noting about this is that it will require some change in the CMS, is that our Since this is an issue in deploy, and the decision on how to fix it is in their hands, I'll go ahead and transfer this issue over to the deploy tracker. |
I've been debugging this issue and can confirm it is indeed triggered by Deploy saving multiple data types in a single scope (as part of a schema deployment), but only when one of those is a newly added data type. However, the exception is caused by the CMS not correctly updating an internal
TL;DR: The CMS currently doesn't correctly handle saving multiple data types when creating a There are some differences when data types are saved as part of a schema deployment in Deploy (compared to when saved in the back-office), making the exception more likely to occur:
We'll update Deploy v4+ to group the data type saved events/notifications as @nikolajlauridsen also suggested, so users can easily update to the latest Deploy version. I'll also create a PR for the CMS to do the same, as this can use most of the existing event grouping that's already implemented for content/media/member types 👍🏻 |
This fix will be released in the next patch releases for Deploy, due next Tuesday. |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
Multiple v8 versions and v10.3.2
Bug summary
This is an issue I've only seen on Umbraco Cloud in connection with deployments. Thankfully it's not a frequent issue and it does seem to resolve itself after a couple of deployments in most cases. Nevertheless, it's can be quite frustrating for the customers to watch out for this, especially when it's a baseline/child setup.
It's been there since the beginning of v8 and even though I've not seen it reported on v9 and v10 I was able to reproduce the issue on a v10 project.
In short, there will be a deployment with changes to document and data types where instead of a successful extraction there will be a boot failed or an unsuccessful extraction.
The data type can be found in the database and it's not always the same data type which will be the issue.
The workaround is simple. After you restart the site it will boot up just fine and you can extract the changes successfully.
My initial thought was that this was a Deploy issue with extracting changes before Umbraco had completed building the cache on boot-up. Following that, I asked Andy to take a look at a site where the issue could be reproduced consistently. Turns out the failure to boot-up was a red herring. This is what he found:
The TODO specifically mentions a potential race condition with data types and content types.
Here is a screenshot from a previous debug session where you can see how many datatypes are in
publishedDataTypes
when I hit the extraction error and after I restart the site and trigger extraction again.Specifics
Steps to reproduce
I don't have a way to reproduce it without using Deploy and UDA files I got from a customer project.
The method would be to:
Reach out to me and I'll ship you the two sets of UDA files.
Expected result / actual result
I expect a successful extraction and the Nucache to be updated without any issues.
This item has been added to our backlog AB#25490
The text was updated successfully, but these errors were encountered: