Hi all,
I'm experiencing a frustrating blocker when trying to push an update of a managed solution through to our production environment, both via pipeline and manual export/import.
As mentioned in the title, the Import stage of the deployment is successful, and I end up with the current solution and '[solution name]_update' version of the solution present concurrently. The updated version of the contained canvas app goes live and functions as intended. However, the Uninstall stage fails every time with the following error:
The DELETE statement conflicted with the REFERENCE constraint "relationship_referenced_attribute". The conflict occurred in database "db_crmcoregbr_20230915_08344189_56e7", table "MetadataSchema.Relationship", column 'ReferencedAttributeId'. The statement has been terminated.
I should point out that several components present in the live solution have since been been removed from the update solution as part of a refresh. However, there are no dependencies between the removed components and remaining ones. I have also checked individual component dependencies in the live version against other components outside of the managed solution in the production environment but cannot find anything.
I've tried to 'apply upgrade' but just get the same error message. This therefore leaves me stuck with multiple managed layers and an inability to put any further updates out, so I have had to delete the 'update' solution and roll back to the original managed solution.
I've successfully deployed an update of a separate managed solution to production through the same pipeline, so I know there's no global issue with the production environment. I've also imported a copy of the live solution to a standalone test environment and then pushed the updated version through afterwards, and it succeeded. So the package itself is sound and there doesn't seem to be a direct issue of updating the managed solution itself - just not in our production environment ☹️.
Our schema has a fair few N:N relationships using OOB linking tables, so I'm very keen not to have to export the data from production and delete the solution entirely to start over.
I'd really appreciate any insight, particularly on the error message and ways in which I might be able to resolve this issue.
Tagging @Amik