forcedotcom / forcedotcom/cli

"sf project generate manifest --from-org pbo" generates a manifest including unexpected installed package metadata

Open
#2,759 14 comments 0 reactions 0 assignees View on GitHub
bug owned by another team validated
Dominant language
No language data
Stars
571
Forks
80
Avg merge
2d 15h
Merged PRs (30d)
3

Description

> **Note**
> Before you submit your issue, make sure that:
> - You're using the latest version of Salesforce CLI.
> - You've searched both open and closed issues for related posts.
> - You've used the `doctor` command to diagnose common issues.

% sf doctor
=== Running all diagnostics

pass - salesforcedx plugin not installed
pass - no linked plugins
pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches apiVersion
pass - [@salesforce/plugin-deploy-retrieve] default target DevHub max apiVersion matches default target org max apiVersion
pass - [@salesforce/plugin-deploy-retrieve] sourceApiVersion matches default target org max apiVersion
pass - using latest or latest-rc CLI version

> - You understand that GitHub Issues don't adhere to any agreement or SLA.
> - If you require immediate assistance, use official channels such as Salesforce Customer Support.

### Summary
`sf project generate manifest --from-org` generates a manifest which mentions packaged metadata, when the default is that it should not (see the "-c" option).

### Steps To Reproduce

- log in to any production org which include an installed package. In my case, I am using a new PBO (partner business org), but I also got the error in a recent P10 Non Profit org with NPSP packages
- run the command `sf project generate manifest --from-org pbo -d .`
- open `./package.xml`and search for "CustomObjectTranslation" where, among others, you will find package metadata (eg "CHANNEL_ORDERS__" or "sfcma__")

### Expected result
The generated manifest file should not mention any packaged metadata

### Actual result
The generated manifest file contains metadata of installed packages such as :
```

CHANNEL_ORDERS__COA_BatchConfiguration__c-en_US
CHANNEL_ORDERS__Customer_Order_Product_History__c-en_US
CHANNEL_ORDERS__Customer__c-en_US
CHANNEL_ORDERS__Partner_Contract_Terms__c-en_US
CHANNEL_ORDERS__Partner_Pricebook_Entry__c-en_US
CHANNEL_ORDERS__Partner_Product_Catalog__c-en_US
CHANNEL_ORDERS__Service_Order_Detail__c-en_US
CHANNEL_ORDERS__Service_Order_Log__c-en_US
CHANNEL_ORDERS__Service_Order__c-en_US
CHANNEL_ORDERS__System_Property__mdt-en_US
CodeBuilder__Alert__e-ar
CodeBuilder__Alert__e-bg
CodeBuilder__Alert__e-cs
CodeBuilder__Alert__e-da
CodeBuilder__Alert__e-de
CodeBuilder__Alert__e-el
```

### System Information

Shell : zsh

sf version --verbose --json :
```json
{
"architecture": "darwin-x64",
"cliVersion": "@salesforce/cli/2.30.8",
"nodeVersion": "node-v18.17.0",
"osVersion": "Darwin 21.6.0",
"rootPath": "/Users/rupert/.nvm/versions/node/v18.17.0/lib/node_modules/@salesforce/cli",
"shell": "zsh",
"pluginVersions": [
"@mkreth/sfdx-metadata-coverage 0.4.0 (user)",
"@mshanemc/plugin-streaming 1.1.7 (user)",
"@mshanemc/sfdx-sosl 1.1.0 (user)",
"@oclif/plugin-autocomplete 3.0.9 (core)",
"@oclif/plugin-commands 3.1.4 (core)",
"@oclif/plugin-help 6.0.13 (core)",
"@oclif/plugin-not-found 3.0.11 (core)",
"@oclif/plugin-plugins 4.2.5 (core)",
"@oclif/plugin-search 1.0.16 (core)",
"@oclif/plugin-update 4.1.13 (core)",
"@oclif/plugin-version 2.0.12 (core)",
"@oclif/plugin-warn-if-update-available 3.0.12 (core)",
"@oclif/plugin-which 3.1.0 (core)",
"@rupertbarrow/rapido-sf-plugin 1.11.6 (user)",
"@salesforce/cli 2.30.8 (core)",
"apex 3.0.25 (core)",
"auth 3.3.13 (core)",
"data 3.1.1 (core)",
"deploy-retrieve 3.2.16 (core)",
"dev 2.0.4 (user)",
"info 3.0.27 (core)",
"limits 3.1.10 (core)",
"marketplace 1.0.25 (core)",
"org 3.3.14 (core)",
"packaging 2.1.10 (core)",
"schema 3.1.3 (core)",
"settings 2.0.27 (core)",
"sobject 1.1.13 (core)",
"source 3.1.15 (core)",
"telemetry 3.1.13 (core)",
"templates 56.0.16 (core)",
"trust 3.3.10 (core)",
"user 3.2.11 (core)",
"@salesforce/sfdx-scanner 3.19.0 (user)",
"shane-sfdx-plugins 4.43.0 (user)",
"texei-sfdx-plugin 2.2.1 (user)"
]
}
```

### Additional information

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.