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

force:source:retrieve on top level produces different source than when run on subdirectories #424

Open
cBiscuitSurprise opened this issue Jun 1, 2020 · 3 comments
Labels
area:auth Authorization Experience owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.

Comments

@cBiscuitSurprise
Copy link

Summary

Working on a Gen-1 Manage Package, specifically with permission sets, the source content depends on how it's retrieved from the Org.

Running force:source:retrieve with --sourcepath pointing to the top level project (force-app/main/default) produces slightly different source than if run on a sub-directory (force-app/main/default/permissionsets). Both sets of source are functionally equivalent, but the first version produces source with "extra" permission definitions whereas the second version produces a cleaner set of source with just the settings originally specified in the permission sets.

Steps To Reproduce:

Repository to reproduce: dreamhouse-lwc

Should I have forked that repo? The steps below are sufficient to reproduce this issue, but I can fork and push what I did to reproduce (just step 1).

  1. Create copy of dreamhouse.permissionset-meta.xml and remove all settings for Property__c (delete lines 204-219, 191-199, 50-181, 7-14)
  2. Push new permission set to the Org
  3. Run sfdx force:source:retrieve --sourcepath ".\force-app\main\default\permissionsets", note the contents of the new permission set go unchanged.
  4. Run sfdx force:source:retrieve --sourcepath ".\force-app\main\default", note the contents of the new permission set are updated with all the implicit settings for Property__c, which were originally unspecified.

Expected result

Source managed by SFDX doesn't depend on how it's retrieved from the Org.

Actual result

Source depends on how it's retrieved from the Org.

Additional information

Note: We're working a blended a workflow between Gen 2 and Gen 1. Our Managed Package is Gen 1, but we're trying to transition to developing in Scratch Orgs and then sync to our Gen 1 Dev Org for the release process.

SFDX CLI Version(to find the version of the CLI engine run sfdx --version):

sfdx-cli/7.58.2-937f666ed4 win32-x64 node-v10.15.3

SFDX plugin Version(to find the version of the CLI plugin run sfdx plugins --core)

@oclif/plugin-autocomplete 0.1.5 (core)
@oclif/plugin-commands 1.2.3 (core)
@oclif/plugin-help 2.2.3 (core)
@oclif/plugin-not-found 1.2.3 (core)
@oclif/plugin-plugins 1.7.9 (core)
@oclif/plugin-update 1.3.9 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-diff 0.0.6
@salesforce/sfdx-trust 3.0.7 (core)
analytics 1.7.1 (core)
generator 1.1.2 (core)
salesforcedx 48.14.3 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.5 (core)
├─ salesforcedx-templates 48.17.0 (core)
└─ salesforce-alm 48.15.0 (core)

sfdx-cli 7.58.2 (core)
shane-sfdx-plugins 4.28.2

OS and version:

Windows 10 Pro Version 1909 (OS Build 18363.836)

@clairebianchi clairebianchi added the waiting for internal reply The Salesforce team is working on a fix and has promised an update label Jul 17, 2020
@clairebianchi
Copy link
Collaborator

@cBiscuitSurprise We are taking a look, thank you for providing repro steps in dreamhouse

@mshanemc
Copy link
Contributor

W-8186724

@mshanemc mshanemc added owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team. and removed waiting for internal reply The Salesforce team is working on a fix and has promised an update labels May 20, 2021
@github-actions
Copy link

We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.

@preddivari preddivari added the area:auth Authorization Experience label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:auth Authorization Experience owned by another team The Salesforce CLI team does not own this work but will pass on the information to the correct team.
Projects
None yet
Development

No branches or pull requests

4 participants