We are still facing the custom label issue, but only when adding new custom labels (not editing existing ones) to the file CustomLabels.labels-meta.xml.
This is working fine:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>LABEL1</members>
<name>CustomLabel</name>
</types>
<version>52.0</version>
</Package>
Now, if we add a new custom label to the file sfdx/main/default/labels/CustomLabels.labels-meta.xml, for example:
<labels>
<fullName>WALTEST</fullName>
<language>en_US</language>
<protected>false</protected>
<shortDescription>WALTEST</shortDescription>
<value>WALTEST</value>
</labels>
And then we do the exact same step above, we get an empty package.xml file and the deployment fails.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>52.0</version>
</Package>
When we edit an existing label called EXISTINGLABEL AND add a new one called TESTLABEL, we get this package.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>EXISTINGLABEL</members>
<name>CustomLabel</name>
</types>
<version>52.0</version>
</Package>
The main difference is that editing an existing label (by editing its description for example) is detected, but adding a NEW label to the file is not detected. This was also the behavior prior to this new 4.7 version.
Note that the customLabels file has more than 40k lines.
We are using the latest 4.7 version.
Thanks.
Hi @welhorr !
Thanks for raising it.
I thought this use case was covered by the tests...
I'll have a look at it very soon reusing the data you sent
I tested using the reproduction playground and I did not manage to reproduce the issue...
Do you manage to reproduce on your machine by making sure you are using the last version of sgd ?
If so, then could you fork the branch of the reproduction playground and commit your analysis @welhorr ? It will greatly helped us as we do not reproduce it for now
Tips
Here is how I work with the reproduction playground:
- I create a branch (but here you can use issue/47-again)
- I put the init data (in this case it is the big CustomLabel file, which is already present)
- I make the changes in the files (in this case it is a random change of the description + the > addition of a CustomLabel. I tried to add it at the start and the end of the file with the same result)) and I commit it
- I run sgd and commit the result with a commit message explaining the result
Thanks @scolladon , let me check and I will get back to you about this one.
Hi @scolladon , it seems this is fixed now after further testing it. Thanks for the great support here!
Most helpful comment
Hi @scolladon , it seems this is fixed now after further testing it. Thanks for the great support here!