scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
405 stars 111 forks source link

`force-app` folder appears in the `ExperienceBundle` type in package.xml #834

Closed gavignon closed 3 months ago

gavignon commented 3 months ago

Issue verification check:

What is the problem?


When using latest version (5.38.0) the generated package.xml file has incorrect metadata members corresponding to package directories (for example: force-app).

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

sf sgd source delta -i .deltaIgnore -f {PREVIOUS_TAG} -t HEAD -a 59.0 --output 'output'

What is the expected result?

output/package/package.xml with correct metadata types and members.

What is the actual result?

output/package/package.xml with incorrect metadata types and members (for example "force-app" in the metadata type "ExperienceBundle"

`

CustomerService
    <members>force-app</members>
    <name>ExperienceBundle</name>
</types>`

Steps to reproduce

sf sgd source delta -i .deltaIgnore -f {PREVIOUS_TAG} -t HEAD -a 59.0 --output 'output'

Execution context


Operating System: MacOS Sonoma

yarn version: 1.22.17

node version: v20.12.2

git version: 2.42.0

sfdx version: 2.36.8

sgd plugin version: 2.38.0

More information (optional)

scolladon commented 3 months ago

Hi @gavignon !

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

Do you know how to reproduce it? What is the minimum change I can do in a commit to have containing folder being listed in the ExperienceBundle type? I'd like to fix it fast 👍

gavignon commented 3 months ago

@scolladon I have the issue on several repositories without any specific change. Each time it's added to another metadatatypes, for example I had the issue on an Analytics repository with multiple package directories and they all went to "EmailServicesFunction" metadata type, while no metadata with this type is present in the repository.

scolladon commented 3 months ago

The EmailServicesFunction issue should be fixed with the current latest and latest-rc version (5.38.3) I'll try to reproduce the force-app folder issue ASAP Thanks for your help 👍

richcallear commented 3 months ago

Also experiencing this bug this afternoon - unsure if it's coincidence or not but my delta does consist of some Digital Experience changes; but then this spurious ExperienceBundle called force-app is getting added too.

richcallear commented 3 months ago

Also experiencing this bug this afternoon - unsure if it's coincidence or not but my delta does consist of some Digital Experience changes; but then this spurious ExperienceBundle called force-app is getting added too.

Just following up - I rolled back release by release to 5.36.0 but still had the same issue - then I jumped back to 5.13.0 and the issue is not present - so it feels like this has been in the codebase for a while; but it's really odd that 2 of us came across it within an hour of each other this afternoon.....

Edited to add - 5.34.0 works fine, 5.35.0 does not

scolladon commented 3 months ago

Yes @richcallear, thanks for the analysis 🙏

You can find details here of why it occurs now

TL;DR; If you are impacted by this bug you should use the stable channel (currently v5.34.0) I'm currently reproducing and debugging I'll ship the fix ASAP

github-actions[bot] commented 3 months ago

Shipped in release v5.38.4. You can install the new version using the version number or the latest-rc channel

$ sfdx plugins:install sfdx-git-delta@latest-rc
$ sfdx plugins:install sfdx-git-delta@v5.38.4

Happy incremental deployment!