Skip to content

*.profile-meta.xml files are not pulled after object deletion #14

@sauloefo

Description

@sauloefo

Summary

After custom object deletions in a scratch org, files related to profile are not updated by sfdx force:source:pull command.

Steps To Reproduce:

  1. Create a new scratch org.
  2. Open the new scratch org.
  3. Create a new Custom Object.
  4. Retrieve modified metadata with sfdx force:source:pull
  5. Verify the profile files are referencing, for instance, the new custom object layouts.
  6. In the scratch org, delete the created Custom Object
  7. Retrieve the metadata using sfdx force:source:pull again

Expected result

The *.profile-meta.xml files doesn't contain any reference to deleted custom object assets.

Actual result

The *.profile-meta.xml files keeps references to deleted custom object assets. This will cause failure to any upcoming sfdx force:source:push execution.

Additional information

Created Object:
screenshot 2019-01-27 at 3 00 29 p m

Retrieved metadata using sfdx force:source:pull
screenshot 2019-01-27 at 3 01 27 p m

Retrieved metadata after custom object deletion.
screenshot 2019-01-27 at 3 02 55 p m

Content of profile-meta.xml files after custom object deletion and pulling of scratch org source code.
screenshot 2019-01-27 at 3 06 09 p m

ERROR: result of sfdx force:source:push -f into a new scratch org with the last pulled source code version:
screenshot 2019-01-27 at 3 10 59 p m

SFDX CLI Version: sfdx-cli/6.50.0-9817aece8a (darwin-x64) node-v8.9.4

OS and version: darwin18 (MacOS Mojave)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:custom-schemabugIssue or pull request that identifies or fixes a bugowned by another teamThe Salesforce CLI team does not own this work but will pass on the information to the correct team.tracked elsewhereThe work is being tracked internally by Salesforce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions