-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
[Labels Directory] CustomLabel file doesn't contains label changes #47
Comments
Hi @arafesthain Thanks for this issue ! |
Hi @scolladon |
hey, it seems like this issue came back, steps to reproduce are exactly the same |
Hi @osieckiAdam, Thanks for raising this issue back. Thanks in advance |
Hey all I did is that I created delta from two different branches, and the only difference was custom label file. Generated package.xml was empty, I also checked destructive changes just to be sure that it was not a matter of mistake with parameters but it is also empty |
Hi @osieckiAdam, I currently do not reproduce it, it is working fine on my laptop. Could you create a repository where the issue is reproducible, describe the steps to reproduce the issue using the repo and expose the repo on github please ? |
I guess that this is not related to repository, because I tried on few different projects, and I also created dummy customLabel file with only few labels and it didn't work too. Maybe its because of node version? I had to update node to be able to use this plugin, so I installed sfdx cli using npm and updated node to version v15.8.0 I'm not sure what else could have impact on this functionality, let me know if any other data from my env would be helpful |
@osieckiAdam separating the cli from npm is a good thing. The sfdx CLI comes with its own npm install if no install are available, which is not convenient for plugin developed using a more recent version of npm. My point here is to be able to reproduce it on my laptop using a repository you could build just to isolate the issue you are experiencing. If I reproduce it using the repository and the steps provided then I'll be able to see the issue. If I do not reproduce it then maybe there is something in the environment of execution. |
@osieckiAdam @arafesthain I've tried to reproduce the issue with @scolladon and did not manage to. |
Hi there @mehdisfdc |
Repo: I'm using command:
package.xml file in output folder looks like:
node: |
Hi @osieckiAdam ! Thanks for the repro repos and steps Context : $ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins
Darwin Kernel Version 18.7.0: Tue Jan 12 22:04:47 PST 2021; root:xnu-4903.278.56~1/RELEASE_X86_64
1.22.10
v15.9.0
git version 2.30.1
sfdx-cli/7.86.3 darwin-x64 node-v15.9.0
sfdx-git-delta 4.2.1 Repro steps : $ mkdir temp && cd $_
$ git clone https://github.com/osieckiAdam/sgd-dummy.git sgd-dummy && cd $_
$ git fetch -pPt
$ git check sgd-test
$ git checkout master
$ git diff master sgd-test
diff --git a/force-app/main/default/labels/CustomLabels.labels-meta.xml b/force-app/main/default/labels/CustomLabels.labels-meta.xml
index a221b20..60f5918 100644
--- a/force-app/main/default/labels/CustomLabels.labels-meta.xml
+++ b/force-app/main/default/labels/CustomLabels.labels-meta.xml
@@ -1,110 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<CustomLabels xmlns="http://soap.sforce.com/2006/04/metadata">
- <labels>
- <fullName>AddToCart</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Add to cart</shortDescription>
- <value>Add to cart CHANGED</value>
- </labels>
- <labels>
- <fullName>Asterisk</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Asterisk</shortDescription>
- <value>*</value>
- </labels>
- <labels>
- <fullName>Asterisk2</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Asterisk2</shortDescription>
- <value>*2</value>
- </labels>
- <labels>
- <fullName>Asterisk3</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Asterisk2</shortDescription>
- <value>*3</value>
- </labels>
- <labels>
- <fullName>Available_Items</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Available Items</shortDescription>
- <value>available Items</value>
- </labels>
- <labels>
- <fullName>AverageUsersRating</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Average user's rating:</shortDescription>
- <value>Average user's rating:</value>
- </labels>
- <labels>
- <fullName>BasedOn</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>(based on</shortDescription>
- <value>/5 (based on</value>
- </labels>
- <labels>
- <fullName>BuyNow</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Buy now</shortDescription>
- <value>Buy now</value>
- </labels>
- <labels>
- <fullName>By_clicking_on_icon_below</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>By clicking on icon below:</shortDescription>
- <value>By clicking on icon below:</value>
- </labels>
- <labels>
- <fullName>Cancel</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Cancel</shortDescription>
- <value>Cancel</value>
- </labels>
- <labels>
- <fullName>Close</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Close</shortDescription>
- <value>Close</value>
- </labels>
- <labels>
- <fullName>Close_window</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Close window</shortDescription>
- <value>Close window</value>
- </labels>
- <labels>
- <fullName>CompanyName</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>CompanyName</shortDescription>
- <value>Company Name</value>
- </labels>
- <labels>
- <fullName>Contact</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Contact</shortDescription>
- <value>Contact</value>
- </labels>
- <labels>
- <fullName>ContactMeIfAvailable</fullName>
- <language>en_US</language>
- <protected>true</protected>
- <shortDescription>Contact me if available</shortDescription>
- <value>Contact me if available</value>
- </labels>
<labels>
<fullName>Contact_Us</fullName>
<language>en_US</language>
$ mkdir output
$ sfdx sgd:source:delta -f master -t sgd-test
{
"error": null,
"output": "./output",
"success": true,
"warnings": []
}
$ cat output/package/package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>50.0</version>
</Package>%
$ cat output/destructiveChanges/destructiveChanges.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>AddToCart</members>
<members>Asterisk</members>
<members>Asterisk2</members>
<members>Asterisk3</members>
<members>Available_Items</members>
<members>AverageUsersRating</members>
<members>BasedOn</members>
<members>BuyNow</members>
<members>By_clicking_on_icon_below</members>
<members>Cancel</members>
<members>Close</members>
<members>Close_window</members>
<members>CompanyName</members>
<members>Contact</members>
<members>ContactMeIfAvailable</members>
<name>CustomLabel</name>
</types>
<version>50.0</version>
</Package>%
$ cat output/destructiveChanges/package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<version>50.0</version>
</Package>% The force-app/main/default/labels/CustomLabels.labels-meta.xml file is changed To me it is working as designed, is there an issue somewhere else ? Or maybe I have misunderstood something ? |
@scolladon thanks for taking care of it
This is also true for regular changes (I mean non-destructive), please see following example (I updated repo)
Operating System: |
Hi @osieckiAdam can you add -d option? |
Sure,
I updated plugin I tried again:
Unfortunately result is the same |
@scolladon @mehdisfdc reproduced here
Version:
Also reproduced on 4.2.1 |
@scolladon the bug is larger than destructive change. FYI, the environment is different (Ubuntu 18.04 on Azure Pipeline).
|
@alexmodis when reproducing, are you sure to have pulled the branches $ git checkout sgd-test
$ git checkout master
$ git branch
sgd-test
* master |
@scolladon yes I'm all fetched, I retried this morning and I confirm I didn't get anything in destructive changes too |
Thanks guys, I guess it is somehow related to the running architecture. We need to keep track of working running environment and non working running environment in order to isolate the root cause of the issue. My architecture is working : $ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins
Darwin Kernel Version 18.7.0: Tue Jan 12 22:04:47 PST 2021; root:xnu-4903.278.56~1/RELEASE_X86_64
1.22.10
v15.9.0
git version 2.30.1
sfdx-cli/7.86.3 darwin-x64 node-v15.9.0
sfdx-git-delta 4.2.1 Maybe we will need in the future to have a matrice of non regression testing for OS/npm version/sfdx version at least for the last 2 version for sfdx and npm |
We plan to start using delta deployments since our project grew big and I recommended SGD to my team. Unfortunately, I also encountered the same problem reported by people in this thread. Steps to reproduce are simple:
OS: Windows 10 @scolladon do you expect to have this issue resolved anytime soon? Can we do anything to help in the process? Thanks. |
Hi @bakilasek ! Currently I cannot reproduce on my laptop. I'll try to reproduce it on a windows machine asap |
Hi @bakilasek ! Thanks for the very precise investigation. I think I see the root cause of the issue now. To fix it I apply the same method as for the "Modification". |
@scolladon It seems like we have exactly the same issue with Sharing Rules, keeping my fingers crossed so that this fix will also work for them! |
You're right, the issue is here for every "inFile" metadata types. |
Hi @scolladon With the newest version 4.3.1 it seems like the issue still persists. My architecture is the following, very simiarly built from a Dockerfile by medhi, which you reference in the sgd documentation:
The difference between two commits is:
When I use the <?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>Set_Description_on_New_Cases</members>
<name>Flow</name>
</types>
<version>51.0</version>
</Package> It doesn't contain the custom label file, which I had hoped for. |
Thanks for reopening it as it is not fixed yet. Sorry for the inconvenience. I'll try find times this week-end to look at it |
Hi ! I tried to reproduce the issues in the reproduction playground branch issue/47 from the description. @nickytorstensson Is there anything I miss? Could help me reproduce either by driving me to the right set up or by creating another PR on the reproduction playground to isolate the issue so I can debug it, please? My architecture $ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins
Darwin Kernel Version 18.7.0: Tue Jan 12 22:04:47 PST 2021; root:xnu-4903.278.56~1/RELEASE_X86_64
1.22.10
v14.16.0
git version 2.31.1
sfdx-cli/7.94.3 darwin-x64 node-v14.16.0
sfdx-git-delta 4.3.1 |
Hi @scolladon I apologize for the inconvenience. Again, great plugin, keep up the good work. |
No problem at all! Thank you for your contribution and your time spent to make this plugin better! Thanks for your appreciation of the plugin! |
Hi @scolladon , could you define an "inFile metadata type", please ? |
Hi @AltiusRupert ! Sure, inFile metadata type are metadata type which are contained in a file and do not have their own file. Per exemple WorkflowFieldUpdate metadata type do not have its own file, it is contained in the Workflow file in a dedicated xml element. There are a few other element like this one (CustomLabel, SharingRule, Workflow, PermissionSet and Profile) |
@scolladon Is there any way to find/query a complete list of these ? |
I think it is in the Metadata API documentation, meaning when you browse to workflow per example you will see the definition of contained metadata element. "inFile" is more a category we created in this plugin to treat those element the same way. |
@scolladon , we are facing the same issue, but only when adding new custom labels (not editing existing ones) to the file CustomLabels.labels-meta.xml. This is working fine:
Now, if we add a new custom label to the file sfdx/main/default/labels/CustomLabels.labels-meta.xml, for example:
And then we do the exact same step above, we get an empty package.xml file and the deployment fails. Note that the customLabels file has more than 40k lines. Thanks. |
Hi @welhorr ! Let's reopen the issue ! Could you provide more information about the context of the issue : # execute this command
$ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins Operating System: … Then would it be possible to create a reproduction branch with the minimum content (obfuscated/anonymised) required to reproduce, in the reproduction playground repository so we can work in the same condition ? |
Thanks a lot @scolladon, Operating System: #49~18.04.1-Ubuntu SMP Thu Apr 22 21:28:54 UTC 2021 I could not create a branch from the reproduction playground repository. Can you please let me know how to do so? |
@welhorr you should be able to create branch by forking the repository. Also you should retry using the latest version of the plug-in (4.6.1), just to be sure |
Will do thanks @scolladon . |
Using sfdx command:
|
Thanks @scolladon , we will try to update and get back to you. |
@scolladon is this a known issue now? When do you think it will get fixed? |
@welhorr yes, thanks to your reproduction scenario we have been able to identify the root cause. There is a pull request related to this issue. It will be reviewed this week and included in the next release. We will keep you posted ! |
Hi @welhorr ! New version 4.7 (released today) is more robust to large files ! And feel free to raise any other issue and contribute to make this plugin better |
Issue verification check :
What is the problem
Git diff is containing CustomLabels file modification but sgd output contains an empty customLabel file
git output:
sgd output :
What is parameter and their value you used
sgd -d -t HEAD -f origin/master -r . -o output/
and for git :
git diff --no-renames origin/master HEAD
What is the expected result
Custom labels file contains all diff.
What is the actual result
Custom labels file is empty
Steps to reproduce
Make change in customLabels file and see empty sgd output file
Execution context
Operating System: …
Windows 10
NPM version: …
6.14.5
Node version: …
v13.12.0
sgd version: …
3.3.0
The text was updated successfully, but these errors were encountered: