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

LWC component templates issue when generating the force-app delta #414

Closed
pibenett opened this issue Jan 9, 2023 · 11 comments · Fixed by #419 or #423
Closed

LWC component templates issue when generating the force-app delta #414

pibenett opened this issue Jan 9, 2023 · 11 comments · Fixed by #419 or #423
Assignees
Labels
bug Something isn't working

Comments

@pibenett
Copy link

pibenett commented Jan 9, 2023

Hello Sebastien

What is the problem?

The --generate-delta don't generate the full LWC component when this one has a templates sub folder in it.

Capture d’écran 2023-01-09 à 17 16 41

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

sfdx sgd:source:delta --to "origin/release/v2023.01" --from "origin/master" --output changed-sources/ --generate-delta --ignore .forceignore

What is the expected result?

The templates sub folder to be included in the component generated from the delta

What is the actual result?

The LWC component folder is generated only with his JS file in it.

Thank you very much

@pibenett pibenett added the bug Something isn't working label Jan 9, 2023
@scolladon
Copy link
Owner

Hi @pibenett!

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

Do you know if this issue was already present in v5.8.0 (stable) ?

@br0bison
Copy link

br0bison commented Jan 9, 2023

@scolladon We had a similar issue with the LWC components getting identified as part of the delta but the js-meta.xml files were being excluded from a pr validation or deployment as well as an experience site failing validation/deployment due to it not pulling in the required folders. We reverted to v5.8.0 and the issue is not happening now on either.

experience site error - Site.com | We are missing the metadata file in your bundle and are unable to deploy your sites. Update External_Customer_Portal and try again.
reverting back to v5.8.0 it pulled in all the folders for that site folder, v5.10.0 was only pulling the single file of the experience and just the .json files in the pull request

lwc error - An object 'xxxClearance' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory

Only this would pull in with v5.10.0 if committing the .js component in a PR or release:
/home/vsts/work/1/s/salesforce/changed-sources/salesforce/force-app/main/default/lwc:
xxxClearance

/home/vsts/work/1/s/salesforce/changed-sources/salesforce/force-app/main/default/lwc/xxxClearance:
xxxClearance.js

v5.8.0 pulls this back in the delta when just the .js component is committed:
/home/vsts/work/1/s/salesforce/changed-sources/salesforce/force-app/main/default/lwc:
xxxClearance

/home/vsts/work/1/s/salesforce/changed-sources/salesforce/force-app/main/default/lwc/xxxClearance:
xxxClearance.css
xxxClearance.html
xxxClearance.js
xxxClearance.js-meta.xml

@scolladon
Copy link
Owner

Hi @br0bison!

Thank you for your help on this one.
We have rolled back latest channel to v5.8.0 so you should be fine using latest

I'll cook a fix in the coming days and let you know.

@scolladon
Copy link
Owner

scolladon commented Jan 10, 2023

Duplicate of #413

@scolladon scolladon marked this as a duplicate of #413 Jan 10, 2023
@pibenett
Copy link
Author

Hi @scolladon

Sorry I did not mentioned it but indeed I'm running the 5.10.0 (latest-rc) and did not try with the 5.8.0 yet.

Comparing to the #413, my delta folder is created well but on the other hand I had a kind of similar issue as @br0bison where I had to add manually the .site-meta.xml file in my delta generated experiences folder for my LWR site.

@scolladon
Copy link
Owner

Hi @pibenett & @br0bison!

We have a fix cooking here
I tried it with a playground and it is working.

Could you try the PR with your real use case and see if it fixes the issue please ?

@scolladon
Copy link
Owner

Hi @pibenett @br0bison !

We just released the version 5.10.1
You can install it using the latest-rc channel:

$ sfdx plugins:install sfdx-git-delta@latest-rc

Do not hesitate to create an issue if anything goes wrong using it.
Let us know as well if everything goes ok.
We will use your feedback to promote this version to the latest channel.

@br0bison
Copy link

@scolladon Receiving an error when trying to pull in metdata for a change to an experience cloud site still.

Error We are missing the metadata file in your bundle and are unable to deploy your sites. Update External_Customer_Portal and try again

The LWC components didn't have errors and looks to pull in all of the js-meta.xml files as required.

@scolladon
Copy link
Owner

I reopen the issue then

Thanks @br0bison, great feedback

@br0bison
Copy link

br0bison commented Jan 17, 2023

v5.8.0 build file.txt
latest-rc build file.txt

Here are my build files for the experience cloud site components as a comparison between the two. I ran a compare in ultraedit and this one component is missing in latest-rc.
External_Customer_Portal1.site-meta.xml

@scolladon
Copy link
Owner

Hi @pibenett @br0bison !

We just released the version 5.10.2
You can install it using the latest-rc channel:

$ sfdx plugins:install sfdx-git-delta@latest-rc

Do not hesitate to create an issue if anything goes wrong using it.
Let us know as well if everything goes ok.
We will use your feedback to promote this version to the latest channel.

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
3 participants