-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
force:source:convert error when deploying child metadata without parent object #1110
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
@pfordey what was happening before when you got a success message? The object and all its children were all being ignored and not in the output? BTW, nice repro-repo. |
@mshanemc prior to version 7.112 everything was working and the source was converted with the following output:
The fields for the objects were being correctly pushed into the packaging org and added to the managed package within that org. This was not just fields but also compact layouts, list views, validation rules and actions. Since 7.112 was the current stable release we have been getting the error about requiring the parent object metadata file. Some extra context: The SFDX CLI is being installed in a Ubuntu VM that is being called from Github Actions to create a VM to pull down the code, run a number of scripts to take the source format, convert it to the metadata format, create a package.xml with the namespace of the managed package that it is being pushed into added and then deployed into a packaging org with the namespace in the package.xml so that it automatically adds new items to the package. We do not want to include the complete metadata file for objects as some of those objects, such as the one in the example repo, are part of other managed packages and so including them in our source and being pushed into our packaging org causes issues when those objects are updated by the owner of the dependent package as well as us adding items to the package that we do not want to do. Since the source format does not include any way to push to a packaging org and include what is being pushed into the managed package in that org we can only manually add items to the package that is time consuming and error prone or convert to metadata format, build a package.xml with the name space added to it and then push via the metadata api methods within SFDC CLI. You are welcome for the repo, it is not hard to make a project and add a few files and it helps me as much as you :) |
This issue has been linked to a new work item: W-9720134 |
This issue has been linked to a new work item: W-9720135 |
This would break a lot of projects . As @pfordey mentioned in the additional context, we should not be requiring object-meta.xml as these metadata components are individually deployable |
Hi @pfordey this should be fixed in the latest-rc build of the cli 1.115.0, you can get it by either sfdx update stable-rc or npm install sfdx-cli@latest-rc --global depending on your preferred install method. Please let us know if you're still seeing this in 1.115.0 of the CLI |
@WillieRuemmele still getting 1.114 coming when running sfdx update, once I see 1.115 I will test and let you know. Thanks. |
did you run |
Testing the deployment org with |
@WillieRuemmele I can confirm that with 1.115.1 the issue is corrected. Thank you. |
Summary
When attempting to convert from source to metadata format using force:source:convert where one or more child metadata files are to be deployed but the parent object file is not included the following error is being returned:
Metadata xml file /Users/patrick/SFDXCLI-Issues/SFDXCLI-Issues/CLIIssues/force-app/main/default/objects/hed__Term__c/hed__Term__c.object-meta.xml is forceignored but is required for /Users/patrick/SFDXCLI-Issues/SFDXCLI-Issues/CLIIssues/force-app/main/default/objects/hed__Term__c/fields/Term_Title__c.field-meta.xml
Steps To Reproduce:
Repo with example to reproduce https://github.com/pfordey/SFDXCLI-Issues
run
sfdx force:source:convert -d ./mdapi_output_dir
and you will get the error provided above. If you remove the parent object metafile from the forceignore file it will then work as expected.Expected result
Following message appears in terminal -
Source was successfully converted to Metadata API format and written to the location: mdapi_output_dir
Actual result
Error is given:
Metadata xml file /Users/patrick/SFDXCLI-Issues/SFDXCLI-Issues/CLIIssues/force-app/main/default/objects/hed__Term__c/hed__Term__c.object-meta.xml is forceignored but is required for /Users/patrick/SFDXCLI-Issues/SFDXCLI-Issues/CLIIssues/force-app/main/default/objects/hed__Term__c/fields/Term_Title__c.field-meta.xml
System Information
{
"cliVersion": "sfdx-cli/7.112.1",
"architecture": "darwin-x64",
"nodeVersion": "node-v14.17.4",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.2.2 (core)",
"@oclif/plugin-not-found 1.2.4 (core)",
"@oclif/plugin-plugins 1.10.1 (core)",
"@oclif/plugin-update 1.4.0-3 (core)",
"@oclif/plugin-warn-if-update-available 1.7.0 (core)",
"@oclif/plugin-which 1.0.3 (core)",
"@salesforce/sfdx-plugin-lwc-test 0.1.7 (core)",
"@salesforce/sfdx-trust 3.6.0 (core)",
"alias 1.1.10 (core)",
"apex 0.2.3 (core)",
"auth 1.7.1 (core)",
"config 1.2.14 (core)",
"custom-metadata 1.0.12 (core)",
"data 0.6.0 (core)",
"generator 1.1.7 (core)",
"limits 1.2.1 (core)",
"org 1.6.7 (core)",
"salesforce-alm 52.2.3 (core)",
"schema 1.0.8 (core)",
"sfdx-cli 7.112.1 (core)",
"source 1.0.6 (core)",
"telemetry 1.2.3 (core)",
"templates 52.1.0 (core)",
"user 1.4.0 (core)"
],
"osVersion": "Darwin 20.5.0"
}
The text was updated successfully, but these errors were encountered: