Skip to content
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

sfdx force:source:push deployment order #1132

Closed
constantine-prokopenko-vrp opened this issue Aug 13, 2021 · 12 comments
Closed

sfdx force:source:push deployment order #1132

constantine-prokopenko-vrp opened this issue Aug 13, 2021 · 12 comments

Comments

@constantine-prokopenko-vrp

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:

  1. Create a project with multiple package directories;
  2. Add classes, objects (common SObjects with MDT), page layouts, fields, and custom meta records;
  3. Create a new scratch org;
  4. 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.
Screenshot 2021-08-13 at 17 20 56

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"
}
@constantine-prokopenko-vrp constantine-prokopenko-vrp added the investigating We're actively investigating this issue label Aug 13, 2021
@github-actions
Copy link

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
Copy link
Member

WillieRuemmele commented Aug 16, 2021

Hi @constantine-prokopenko-vrp the salesforcedx plugin has been deprecated and is no longer required... so you've been running older commands of those plugins which could be your problem. I would

  1. sfdx plugins:uninstall salesforcedx
  2. update your sfdx install either sfdx update or npm install sfdx-cli --global
  3. run sfdx plugins --core and verify that everything is listed as (core) for core plugins
  4. and try the command again.

@WillieRuemmele WillieRuemmele added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Aug 16, 2021
@constantine-prokopenko-vrp
Copy link
Author

Good day, @WillieRuemmele.
Everything is done but with the same result in the end, unfortunately. Below you can find output for the sfdx plugins --core command.

@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.23 (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.9 (core)
salesforce-alm 52.2.4 (core)
schema 1.0.8 (core)
sfdx-cli 7.113.0 (core)
source 1.0.7 (core)
telemetry 1.2.3 (core)
templates 52.1.0 (core)
user 1.4.0 (core)

@no-response no-response bot removed the more information required Issue requires more information or a response from the customer label Aug 17, 2021
@WillieRuemmele
Copy link
Member

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.json file as describe in the docs

as a work around you can try sfdx force:source:deploy -p <path to package> and then sfdx force:source:tracking:reset so that a source:status should return no changes, as expected

@constantine-prokopenko-vrp
Copy link
Author

Good day, @WillieRuemmele
sfdx force:source:deploy works well. But we are using the push command in our project as we have multiple modules.

@WillieRuemmele
Copy link
Member

Thanks for getting back @constantine-prokopenko-vrp interesting. Was this working for you before? We haven't changed the push command 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
Copy link

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
Copy link
Contributor

@nigelhughesfairsailcom @constantine-prokopenko-vrp We think this is fixed in the new source:beta commands that hit RC today. If you're able to confirm that with your project, we'd feel even better.

#1258

@constantine-prokopenko-vrp
Copy link
Author

Good day,
@mshanemc, I'll get back right after I'll test it.
Many thanks for the info.

@constantine-prokopenko-vrp
Copy link
Author

Good day,
@nigelhughesfairsailcom, I had a chance to play with the new command.
No luck for me. The sfdx force:source:beta:push -f command gives me the next error - 'Too many files in ZIP'.
Interesting thing is that sfdx force:source:push -f works fine on 7.63.

@mshanemc
Copy link
Contributor

@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
Copy link
Contributor

mshanemc commented Apr 1, 2022

closed with new commands GA

@mshanemc mshanemc closed this as completed Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants