CumulusCI
CumulusCI copied to clipboard
CCI task "push_qa" crashes for Unlocked package with no namespace
Describe the bug
cci task run push_qa --orgs orgs/qa_orgs.txt --org devhub --metadata_package_id 0337S000000XXXXXXX
crashes when the package is an Unlocked package with no namespace.
It seems to expect that the namespace is returned by the query :
SELECT Id, name, namespaceprefix FROM MetadataPackage WHERE Id = '0337S000000PKO8QAO'
In other calls to the same "run push_qa' command, the following query is called :
Error message is :
Error: 'NoneType' object has no attribute 'split'
### Reproduction steps
1. Create an unlocked package and promote it
2. Install this package in an org
3. Declare this org as a global org in CCI services
4. Create a file qa_orgs.txt containing the orgid of this org
5. Run the command
```cci task run push_qa --orgs qa_orgs.txt --org <devhub org name> --metadata_package_id <package 033 id>```
### Your CumulusCI and Python versions
% cci --version
CumulusCI version: 3.69.0 (/Users/rupert/.local/bin/cci)
Python version: 3.10.2 (/Users/rupert/.local/pipx/venvs/cumulusci/bin/python)
### Operating System
MacOS 11.7
### Windows environment
_No response_
### CumulusCI installation method
pipx
### Error Gist
https://gist.github.com/cb6db108ca037c674e27a13dfd6a64d8
### Additional information
This bug probably also applies to the push_sandbox task, and maybe others ?
OK, it seems that, by default, the Packaging Push API is not activated : https://help.salesforce.com/s/articleView?id=000385292&type=1
It would be nice to catch the exception above and display a user-friendly error message telling the user to get this API activated.