scolladon / sfdx-git-delta

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

Destructive xml is not generating #763

Closed sameerseekala1 closed 7 months ago

sameerseekala1 commented 7 months ago

Issue verification check:

What is the problem?

sgd:source:delta is not generating destructive changes between 2 commits. I have deleted couple of record types from Knowledge object and expected the command will generate destructive xml and execute the same in destination org but destructive xml is empty.

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

sgd:source:delta --to sha2 --from sha1 --output changed-sources/ --generate-delta --source force-app/

What is the expected result?

Destructive.xml is empty.

What is the actual result?

It should generate destructive.xml with the names of deleted record types.

Steps to reproduce

Not able to create a branch in the below playground repo.

Execution context


Operating System: … Ubuntu 22.04.3

yarn version: … 1.22.21

node version: … v16.20.2

git version: … 2.43.0

sfdx version: … 7.209.6

sgd plugin version: … 5.34.0

More information (optional)

scolladon commented 7 months ago

Hi @sameerseekala1 !

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

Is there anything in the package.xml ? What is its content ?

If you could create a branch on the reproduction playground with all the necessary to reproduce and share it with us alongside the exact command to reproduce on our side it would be perfect.

Else it would really help us in the investigation if you could provide:

Thanks in advance

sameerseekala1 commented 7 months ago

@scolladon I am not able to create branch on the playground repo to reproduce, can you plz grant access?

scolladon commented 7 months ago

@sameerseekala1 you could fork it and give me access to

sameerseekala1 commented 7 months ago

@scolladon I have granted you access to the repo https://github.com/sameerseekala1/sfdx-git-delta-reproduction-playground/tree/Issue/763

I deleted recordType from 'Issue/763' branch and when we run below command it should generate destructive.xml

mkdir changed-sources sfdx sgd:source:delta --to HEAD --from HEAD~1 --output changed-sources/ --generate-delta --source sgd/

Please check it.

scolladon commented 7 months ago

Thank you very much @sameerseekala1, I can reproduce it on my end. I'll work on it soon and eventually propose a fix.

Stay tuned

sameerseekala1 commented 7 months ago

Sure thanks.

scolladon commented 7 months ago

Hi @sameerseekala1,

After investigating a bit, I remembered we had a similar issue in the past Here is what I found about it.

It seems it was not possible at that time to delete recordTypes via Metadata API... So we made an exception for those types in destructiveChanges.

Do you know if it is possible to delete recordTypes via metadata API using destructiveChanges now ?

sameerseekala1 commented 7 months ago

@scolladon I think no and that make sense, anyways thanks for letting me know.