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

decomposePermissionSetBeta enabled project folder results in broken delta package that includes invalid members #1024

Open
kmelessanakis opened this issue Feb 28, 2025 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@kmelessanakis
Copy link

What is the problem?


When generating a delta package for a project folder that contains decomposed permission sets there are extra elements that break the deployment

What is the parameter and the value you used with it?

sf sgd source delta -f "HEAD~2" -t HEAD -o .

What is the expected result?

    <types>
        <members>PermissionSetA</members>
        <name>PermissionSet</name>
    </types>

What is the actual result?

    <types>
        <members>fieldPermissions</members>
        <members>PermissionSetA</members>
        <members>objectPermissions</members>
        <members>userPermissions</members>
        <name>PermissionSet</name>
    </types>

Steps to reproduce


Retrieve a permission set with the decomposePermissionSetBeta enabled

@kmelessanakis kmelessanakis added the bug Something isn't working label Feb 28, 2025
@scolladon
Copy link
Owner

Hi @kmelessanakis!

Thanks for raising this issue and thanks for contributing in making this project better!

How can I reproduce this issue with your data please ? (do you have an example of the folder and file structure please ?)

Also, can you show the result of this command please : git diff --name-status --no-renames <from> <to>

@kmelessanakis
Copy link
Author

kmelessanakis commented Feb 28, 2025

This is the folder structure that is a result of permissionset decomposition

Image

and this is the diff result

M	force-app/main/default/classes/ProductTriggerHandler.cls
M	force-app/main/default/classes/ProductTriggerHandlerTest.cls
A	force-app/main/default/permissionsets/XXXXCaseUser/XXXXCaseUser.permissionset-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.AccountId.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.Description.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.Origin.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.SourceId.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.Subject.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.SuppliedCompany.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.SuppliedEmail.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.SuppliedName.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.SuppliedPhone.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/fieldPermissions/Case.Type.fieldPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/objectPermissions/Case.objectPermission-meta.xml
A	force-app/main/default/permissionsets/XXXXCaseUser/userPermissions/Microbatching.userPermission-meta.xml
M	force-app/main/default/triggers/ProductTrigger.trigger

To reproduce this issue create a new sfdx project. Enable permissionset decomposition then retrieve any permission set and build a diff between two commits. The result you should get will contain the issue

@scolladon
Copy link
Owner

What is the version of the plugin you use to experience this issue please @kmelessanakis ?

@kmelessanakis
Copy link
Author

The examples i provided were generated by using 6.3.0

@scolladon
Copy link
Owner

I think I see what is the issue here
The plugin is compliant with this Decomposed version for permission set.
I think you are using decomposePermissionSetBeta v1 right ?
If it is the case, could you configure your project to use the decomposePermissionSetBeta2 and try again please ?

@kmelessanakis
Copy link
Author

Yes that is correct as the project configuration was implemented before beta 2 was available. Does that mean that v1 will not be supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants