-
Notifications
You must be signed in to change notification settings - Fork 78
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
2GP packages includes profiles which are not in the package directory #620
Comments
I don't think this can be fixed easily, I guess its by design. The profile is reconciled only to contain the types carried out in the package. This is for the coverage validation testing and other aspects |
@azlam-abdulsalam I don't have issue that profile is stripped out from the items which are not part of the managed packaged. it is OK and it follows what is in the documentation. my issue is that it includes to the package profile from the folder which is outside package. The Profile definition is put outside sfdx-source folder. It should not be picked up by command |
#540 related issue. |
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. |
Im getting error in one of my pr branches, where some items in a profile were updated: I have submitted a support case related to this ticket. As an additional note I checked and the profile was not in any of the released versions of my package. Changing the parameters |
I am getting similar error .. Any solution?
|
Since this is "Working as designed" per the product team for packaging, I created this "Idea" on the idea exchange. Please share and upvote. |
any one had the work around for above issue ? |
the only option to fix it is to remove it from the package, by enabling custom metadata remove from the 2n generation packages. |
I have a cyclic dependency here, Now If we remove again test coverage going to fail. Any Idea on this ? I wanted to retain Admin Profile but CLI removes them automatically. |
We're facing the same issue. In our Git repository we have an
However the Profile from the To debug
|
This is fixed as of CLI v2.11.8 |
Summary
following command
sfdx force:package:version:create
includes all profiles metadata which are in the project directory but are outside of the package source directorySteps To Reproduce:
Repository to reproduce: sfdx-cli-bug
sfdx force:package:create -n YourPackageName -t Managed -v YourDevHub -r sfdx-source/packaged
sfdx force:package:version:create -v YourDevHub -p YourPackageName -x -r -w 30
Expected result
package is crated without admin profile definition
Actual result
package is created with Admin profile which is not part of the package source dir.
Additional information
The command
sfdx force:package:version:create -v samdev -p xxx -x -r -w 30
has additional parameter -r which display temporary folder with converted metadata which will be used to create package. this folder container md-files where is admin profile which should not be includedIt can even go worse, because if there will be additional folder with admin profile (let's assume that it will contain page layout assignment with namespace, then page layout assignment will be filtered out and empty admin profile will not be included in the metadata and will throw error
all that mess is caused by calling
typesArr = this.profileApi.filterAndGenerateProfilesForManifest(typesArr);
inhttps://github.com/forcedotcom/salesforce-alm/blob/e0c7ec04c248592cd25c7fb43f4a386cf5561557/src/lib/package/packageVersionCreateCommand.ts#L347
which then search for profiles in project directory. instead of the project directory it should be restricted to the package directory (sfdx-source/packaged)
SFDX CLI Version(to find the version of the CLI engine run sfdx --version):
sfdx-cli/7.74.1 win32-x64 node-v12.16.2
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.3.0 (core)
@oclif/plugin-help 3.2.0 (core)
@oclif/plugin-not-found 1.2.4 (core)
@oclif/plugin-plugins 1.9.0 (core)
@oclif/plugin-update 1.3.10 (core)
@oclif/plugin-warn-if-update-available 1.7.0 (core)
@oclif/plugin-which 1.0.3 (core)
@salesforce/sfdx-trust 3.4.3 (core)
@sfdx-plugins-lab/plugin-apex-coverage 0.1.5
alias 1.1.1 (core)
analytics 1.12.1 (core)
config 1.1.8 (core)
generator 1.1.3 (core)
salesforcedx 49.10.0 (core)
├─ templates 49.9.1 (core)
├─ custom-metadata 1.0.10 (core)
├─ @salesforce/sfdx-plugin-lwc-test 0.1.7 (core)
├─ apex 0.0.9 (core)
└─ salesforce-alm 49.11.0 (core)
sfdx-cli 7.74.1 (core)
sfdx-codescan-plugin 1.0.4
sfpowerkit 2.1.5
shane-sfdx-plugins 4.39.2
OS and version:
windows 10 PRO Version 10.0.19042 Build 19042
The text was updated successfully, but these errors were encountered: