CumulusCI
CumulusCI copied to clipboard
uninstall_post is not substituting %%%NAMESPACE%%%
Describe the bug
When running the uninstall_post task, Salesforce throws an error UNKNOWN_EXCEPTION: Custom metadata type %%%NAMESPACE%%%[CUSTOM_METADATA_TYPE] is not available in this organization.
Presumably, this is because the uninstall_post task is not doing namespace replacements in package.xml or the metadata itself. Thedeploy_post task in the install_beta flow is successfully completing with the same unpackaged/post contents.
Samples below (brackets are used throughout for substitute text):
package.xml
...
<types>
<members>%%%NAMESPACE%%%[CUSTOM_METADATA_TYPE].[CUSTOM_METADATA_NAME]</members>
<name>CustomMetadata</name>
</types>
...
___NAMESPACE___[CUSTOM_METADATA_TYPE].[CUSTOM_METADATA_NAME].md
...
<values>
<field>%%%NAMESPACE%%%[FIELD_NAME]</field>
<value xsi:type="xsd:string">[VALUE]</value>
</values>
...
Reproduction steps
- Create an
unpackaged/postfolder with metadata that requires namespace labels (such as custom metadata). - Run the
deploy_posttask on a non-namespaced org. - Confirm the
uninstall_posttask is configured withmanaged: Trueand your namespace. - Run the
uninstall_posttask on a non-namespaced org.
Your CumulusCI and Python versions
CumulusCI version: 3.53.0 (/Users/chandleranderson/.local/bin/cci) Python version: 3.10.1 (/Users/chandleranderson/.local/pipx/venvs/cumulusci/bin/python)
Operating System
macOS Monterey 12.2
Windows environment
No response
CumulusCI installation method
pipx
Error Gist
https://gist.github.com/zenibako/15470b7d5fe85d934c50d6dc5931310d
Additional information
No response
Thanks for the report and detailed instructions on how to reproduce the issue.
From initial inspection it looks like the problem is probably that the task is trying to replace ___NAMESPACE___ within package.xml instead of %%%NAMESPACE%%%. I've filed a bug W-10774453 in our internal tracker.
No problem! Thank you for the quick response.