Skip to content

sfdx force:source:push deployment order #1132

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:

  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"
}

Activity

  1. added
    investigating
    on Aug 13, 2021
  2. github-actions commented on Aug 13, 2021

    @github-actions

    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.

  3. WillieRuemmele commented on Aug 16, 2021

    @WillieRuemmele
    Member

    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.
  4. added
    more information required
    and removed
    investigating
    on Aug 16, 2021
  5. constantine-prokopenko-vrp commented on Aug 17, 2021

    @constantine-prokopenko-vrp
    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)
    
  6. removed
    more information required
    on Aug 17, 2021
  7. WillieRuemmele commented on Aug 17, 2021

    @WillieRuemmele
    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

  8. constantine-prokopenko-vrp commented on Aug 19, 2021

    @constantine-prokopenko-vrp
    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.

  9. WillieRuemmele commented on Aug 19, 2021

    @WillieRuemmele
    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?

  10. nigelhughesfairsailcom commented on Sep 2, 2021

    @nigelhughesfairsailcom

    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.

  11. mshanemc commented on Oct 28, 2021

    @mshanemc
    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

  12. constantine-prokopenko-vrp commented on Nov 12, 2021

    @constantine-prokopenko-vrp
    Author

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

  13. constantine-prokopenko-vrp commented on Nov 15, 2021

    @constantine-prokopenko-vrp
    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.

  14. mshanemc commented on Nov 17, 2021

    @mshanemc
    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.

  15. mshanemc commented on Apr 1, 2022

    @mshanemc
    Contributor

    closed with new commands GA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions