Repository navigation
Closed
Description
Summary
The strange behavior of the sfdx force:source:push -f for a project with multiple package directories and a fresh (empty) sandbox.
I am stuck on the issue with the deployment order. For some reason page layout for an object deployed before an object itself.
The error message is the following 'Parent entity failed to deploy.'.
Custom Metadata in the same folder (directory) as classes/layouts using it.
Steps To Reproduce:
- Create a project with multiple package directories;
- Add classes, objects (common SObjects with MDT), page layouts, fields, and custom meta records;
- Create a new scratch org;
- Try using
sfdx force:source:push -f -u <alias/username>;
Expected result
All metadata deployed with no errors.
Actual result
Page Layouts and classes deployed before the object folder. This behavior causes various issues during deployment.

System Information
{
"cliVersion": "sfdx-cli/7.113.0",
"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/analytics 0.30.0",
"@salesforce/sfdx-trust 3.6.0 (core)",
"alias 1.1.10 (core)",
"auth 1.7.1 (core)",
"config 1.2.23 (core)",
"generator 1.1.7 (core)",
"salesforcedx 52.0.0 (latest-rc)",
"├─ user 1.3.0",
"├─ data 0.4.11",
"├─ limits 1.2.1",
"├─ org 1.6.6",
"├─ custom-metadata 1.0.12",
"├─ apex 0.2.2",
"├─ @salesforce/sfdx-plugin-lwc-test 0.1.7",
"├─ templates 51.5.0",
"├─ salesforce-alm 52.0.0",
"└─ schema 1.0.7",
"sfdx-cli 7.113.0 (core)",
"sfpowerkit 3.2.2",
"source 1.0.7 (core)",
"telemetry 1.2.3 (core)"
],
"osVersion": "Darwin 20.6.0"
}
Reacted by Andy Ray, Dzmitry Savinkou and Brian
Metadata
Metadata
Assignees
Labels
No labels
Activity
github-actions commentedon Aug 13, 2021
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.
WillieRuemmele commentedon Aug 16, 2021
Hi @constantine-prokopenko-vrp the
salesforcedxplugin has been deprecated and is no longer required... so you've been running older commands of those plugins which could be your problem. I wouldsfdx plugins:uninstall salesforcedxsfdx updateornpm install sfdx-cli --globalsfdx plugins --coreand verify that everything is listed as(core)for core pluginsconstantine-prokopenko-vrp commentedon Aug 17, 2021
Good day, @WillieRuemmele.
Everything is done but with the same result in the end, unfortunately. Below you can find output for the
sfdx plugins --corecommand.WillieRuemmele commentedon Aug 17, 2021
Hi @constantine-prokopenko-vrp thanks for trying those commands, sorry to hear they didn't work. I'm assuming you've set up the correct package-level dependencies in the
sfdx-project.jsonfile as describe in the docsas a work around you can try
sfdx force:source:deploy -p <path to package>and thensfdx force:source:tracking:resetso that asource:statusshould return no changes, as expectedconstantine-prokopenko-vrp commentedon Aug 19, 2021
Good day, @WillieRuemmele
sfdx force:source:deployworks well. But we are using the push command in our project as we have multiple modules.WillieRuemmele commentedon Aug 19, 2021
Thanks for getting back @constantine-prokopenko-vrp interesting. Was this working for you before? We haven't changed the
pushcommand in a while so I'm surprised to see this new behavior. Could you share your project, or create a sample repository that reproduces this issue that you can share with us?nigelhughesfairsailcom commentedon Sep 2, 2021
I get the same problem it is pushing the code in alphabetical order of directory name. Not in the order they are in the sfdx-project.json file.
mshanemc commentedon Oct 28, 2021
@nigelhughesfairsailcom @constantine-prokopenko-vrp We think this is fixed in the new
source:betacommands that hit RC today. If you're able to confirm that with your project, we'd feel even better.#1258
constantine-prokopenko-vrp commentedon Nov 12, 2021
Good day,
@mshanemc, I'll get back right after I'll test it.
Many thanks for the info.
constantine-prokopenko-vrp commentedon Nov 15, 2021
Good day,
@nigelhughesfairsailcom, I had a chance to play with the new command.
No luck for me. The
sfdx force:source:beta:push -fcommand gives me the next error - 'Too many files in ZIP'.Interesting thing is that
sfdx force:source:push -fworks fine on 7.63.mshanemc commentedon Nov 17, 2021
@constantine-prokopenko-vrp I'm gonna add a "sequential" option for the new push command #1269
There's several people who are relying on the pkgDirs not all going at the same time and it seems like that might help you.
mshanemc commentedon Apr 1, 2022
closed with new commands GA