在1GP软件包创建期间,从包装组织中删除元数据对象的错误
我正在尝试使用[cumulusci] [1]创建一个1GP软件包,作为工作流程的一部分,如果代码中不存在,则有一个步骤“ deploy_packaging.uninstall_packaged_incremental”,它从包装org中删除元数据。在包装组织中,该组织有权删除元数据。 过去,我从同一包装组织发布了1GP包装,但是现在我面临删除元数据的问题。
我的错误是以下内容。如何克服此错误?有什么想法吗?
我正在考虑允许从包装组织中删除包装组件。我可以在存在的组织中看到过时的自定义元数据,当我尝试删除它是在我单击删除时键入“是”的,它告诉我我无法删除托管托管的软件包组件。
[05/26/22 10:15:01] Deleting metadata:
CustomField: One_Degree_Attribute_Setting__mdt.Active__c
CustomField: One_Degree_Attribute_Setting__mdt.Attribute_Tag__c
CustomField: One_Degree_Attribute_Setting__mdt.Last_Run_Datetime__c
CustomField: One_Degree_Zipcode_Search__mdt.Zipcode__c
CustomField: One_Degree_Zipcode_Search__mdt.lat__c
CustomField: One_Degree_Zipcode_Search__mdt.long__c
CustomMetadata: One_Degree_Attribute_Setting.health_clinic
CustomMetadata: One_Degree_Zipcode_Search.X94118
CustomObject: One_Degree_Attribute_Setting__mdt
CustomObject: One_Degree_Zipcode_Search__mdt
Layout: One_Degree_Attribute_Setting__mdt-One Degree Attribute Setting Layout
Layout: One_Degree_Zipcode_Search__mdt-One Degree Zipcode Search Layout
Deleting metadata in package OneDegree from target org
Pending
[05/26/22 10:15:02] [Pending]: next check in 1 seconds
[05/26/22 10:15:03] [Pending]: next check in 1 seconds
[05/26/22 10:15:04] [Pending]: next check in 2 seconds
[05/26/22 10:15:06] [Done]
[05/26/22 10:15:08] [Failed]: Update of CustomMetadata One_Degree_Attribute_Setting.health_clinic: Error: Cannot delete managed object
Update of CustomField One_Degree_Attribute_Setting__mdt.Last_Run_Datetime__c: Error: Cannot delete managed object
Update of CustomField One_Degree_Attribute_Setting__mdt.Active__c: Error: Cannot delete managed object
Update of CustomField One_Degree_Zipcode_Search__mdt.long__c: Error: Cannot delete managed object
[1]: https://cumulusci.readthedocs.io/en/stable/managed_package.html
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
元数据API只是反映了试图删除这些字段时在组织包UI中遇到的可管理性规则。因此,在这种情况下,Cumulusci触发了正常工作的错误。
uninstall_packaged_incremental任务旨在确保您不会在您创建的软件包版本中使用陈旧的元数据(即包装org中的元数据)。如果由于某种原因它找到了陈旧的元数据并且无法将其删除,则它应该失败,因此您不会使用“损坏的”软件包版本。
不幸的是,在这种特殊情况下,您正在尝试删除CustomTadataType上的字段,而不是由托管包装的Guard Rails(可管理性规则)禁止的自定义对象。
Normally, you would需要从托管软件包中获取删除组件,将删除组件应用于您的包装org per
The Metadata API simply mirrors the manageability rules you're encountering in the org's package UI when trying to delete those fields. So, in this case CumulusCI is triggering the error which is working as expected.
The uninstall_packaged_incremental task is intended to ensure you don't wind up with stale metadata (i.e. metadata in the packaging org that's not in git) in the package version you're creating. If for some reason it finds stale metadata and can't delete it, it should fail so you don't wind up with a "corrupted" package version.
Unfortunately, in this particular case you're trying to delete fields on a CustomMetadataType rather than a CustomObject which appears to be prohibited by the guard rails (manageability rules) of managed packaging.
Normally, you would need to get the Delete Components from Managed Packages permission applied to your packaging org per https://help.salesforce.com/s/articleView?id=000326278&type=1