scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
414 stars 112 forks source link

Profile file random behavior on generating Delta changes #787

Closed vivelan closed 6 months ago

vivelan commented 6 months ago

Hi,

I am using Git Delta deployment on my pipeline and I am not sure about the file generating Delta changes on Profile.

I am having Profile file called admin.profile and it has almost all permission like (fieldpermission, classpermission, layout, object etc...) its around 3343 lines, Now I am creating new field under Account object and I am trying to add permission for Field in Admin profile, so i am adding only the new fields permission tag in profile, but while I am going for Delta deployment it creating profile file in Delta but inside the file I can see my changes are coming but along with few extra fields, layout permission also coming.

I am not able to understand, usually it should take the entire profile file 3343 lines or it should take only my changes.

My question is why its taking my changes and some few extra fields sometimes layout or sometimes objects ?

Thanks

scolladon commented 6 months ago

Hi @vivelan !

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

Profile are “scopeable", meaning its content can be "partially" deployed. SGD algorithm filter the content of the profiles based on what has changed inside them so you only deploy what has changed. But for some of the attributes (like layout assignment, ip ranges and a few others) it is not possible to have a unique identifier. Those attributes are not trimmed then, they are ignored from the diff algorithm and stay in the file.

vivelan commented 6 months ago

Thanks for the Quick response!

So on to your answer I understand that this random behavior in generating Profile file is usual! its not issue in my pipeline?

scolladon commented 6 months ago

Yes, this is usual and wanted