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

Delta is not generate for webStoreTemplate and globalValuesSet #884

Closed
LINDVIOR18 opened this issue Jun 13, 2024 · 13 comments
Closed

Delta is not generate for webStoreTemplate and globalValuesSet #884

LINDVIOR18 opened this issue Jun 13, 2024 · 13 comments
Assignees
Labels
bug Something isn't working

Comments

@LINDVIOR18
Copy link

So everything works ok, but there are metadata escapes like for example, Global Values Set and Web Store Template, after generation, they don't appear in changeSet. Even if I do them separately or with all other metadata they never appear in the file as changes.
sfdx-git-delta is used in the pipeline.

Install Salesforce CLI plugin

RUN echo y | sfdx plugins:install sfdx-git-delta

@LINDVIOR18 LINDVIOR18 added the bug Something isn't working label Jun 13, 2024
@scolladon
Copy link
Owner

Hi @LINDVIOR18 !

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

I need more information about the context of execution and how to reproduce it exactly from your end.

Can you give me those information please:

  • Result of the execution of:
$ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins
$ git diff --name-status --no-renames <from> <to>
$ git diff --no-prefix <from> <to> -- <path to the global value set>
  • Steps to execute to reproduce the issue, starting from zero data and zero commit. Show me exactly the name of the files, the path, the content, the commit to do

@LINDVIOR18
Copy link
Author

LINDVIOR18 commented Jun 14, 2024

Screenshot 2024-06-13 at 17 18 03 Screenshot 2024-06-13 at 17 25 59 Screenshot 2024-06-13 at 17 26 25 Screenshot 2024-06-13 at 17 37 45

sfdx-git-delta version 5.40.0 is used
no yarn used

@scolladon
Copy link
Owner

Thank you for that,

They should appear in the destructiveChanges.xml right ?
This is not the case currently ? When you say "ChangeSet" what do you mean ?

@LINDVIOR18
Copy link
Author

Sorry, I compared a blank branch on local and for that reason it appears as destructive, however I am now committing to a blank branch with no data as example UAT branch.
But in any case, none of them are found in destructiveChangeSet and chnageSet.
I previously tried deleting and adding them but they didn't appear and I was already doing it manually but now I decided to open the case.

@scolladon
Copy link
Owner

Ok, I think I understand better.

Could you send me the exact steps to reproduce the issue please (with content)
And also what is the actual result compared to the expected result

Thanks in advance, it will greatly help me solving this problem precisely

@LINDVIOR18
Copy link
Author

LINDVIOR18 commented Jun 14, 2024

pipelineLog-{}.txt

I'm sorry I can't provide more details such as file names but this is the metadata that is generated and it's ok except for those two that are missing.

And here expected package.xml
expext-result.txt

line used for genereation

$sf sgd:source:delta --to "HEAD" --from $ORIGIN_BRANCH --output . --generate-delta

UPD: Sorry my mistake global values set is present, only WebStoreTemplate is not present.

@scolladon
Copy link
Owner

scolladon commented Jun 14, 2024

I tried to reproduce the issue in our reproduction playground from what I understand here.
It may be different from your situation @LINDVIOR18 as I have not the exact steps to create the git content that generates the issue.

Here is the branch : issue/884
I have created a webStoreTemplate (from the doc) and a globalValueSet (from the doc as well)
I have added them in git
And then I execute sgd (sfdx sgd:source:delta -f HEAD~1 -d)
It copies the global value set and the webStoreTemplate in the output folder :

output/sgd/reproduction/playground
├── globalValueSets
│   └── MyGVS.globalValueSet-meta.xml
└── webstoretemplate
    └── MyWebStoreTemplate.webstoretemplate-meta.xml

And it also generates this package.xml:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>MyGVS</members>
        <name>GlobalValueSet</name>
    </types>
    <types>
        <members>MyWebStoreTemplate</members>
        <name>WebStoreTemplate</name>
    </types>
    <version>50.0</version>
</Package>

You can try on your own with the following commands:

git clone https://github.com/scolladon/sfdx-git-delta-reproduction-playground.git
cd sfdx-git-delta-reproduction-playground
git checkout issue/884
sfdx sgd:source:delta -f HEAD~1 -d

I think I am not able to reproduce
Maybe I need more information because I'm doing it wrong.
If so, please tell me exactly how to reproduce the issue

@LINDVIOR18
Copy link
Author

I generated it in the repository you sent and yes it's still ok and a year ago it was still ok when I used it for WebStore Template but now I don't understand what the problem is.
So I have tried to reproduce it in several ways but it doesn't work for me either I can't understand what the problem is.
In your repository I can see that it works, in mine I tried to create 2 empty branches with no data to add WebStoreTemplate in the first one and compare but anyway it doesn't see them, but other metadata is ok.

@scolladon
Copy link
Owner

Could you show the path of the webstore template file please ?

@LINDVIOR18
Copy link
Author

LINDVIOR18 commented Jun 17, 2024

default path

.../force-app/main/default/webStoreTemplates/AC.webStoreTemplate-meta.xml

@scolladon
Copy link
Owner

Ok I see why now...

Both the folder and the suffix of the file are incorrect.
This is why it failed both detection (suffix and folder) in the plugin

To fix that you should change the folder name from webStoreSemplates to webstoretemplate and the file suffix from webStoreSemplate-meta.xml to webstoretemplate-meta.xml
The plugin follows the documentation closely, sometimes more than sfdx cli.

Let me know if it fixed the issue and your side so we can close it :)

@LINDVIOR18
Copy link
Author

LINDVIOR18 commented Jun 18, 2024

Yes that's fixed thank you,
But anyway I think it would be better if we use for the map webStoreTemplates and for the suffix webStoreTemplate which comes default when you do retrive with package.xml

At the moment when I do retries through the package it generates like this and it's a bit inconvenient to search why and change the name.

In any case thanks, so we can close the case and you can update the plugin if you want!?


<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>WebStoreTemplate</name>
    </types>
    <version>60.0</version>
</Package>

@scolladon
Copy link
Owner

Yes, I think too we should close it then.
I will not change the plugin because the plugin is compliant with what is said in the documentation.
I think the issue is in sfdx cli then, it should be fixed there so it retrieves the metadata in the right folder with the right format according to the doc

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
Development

No branches or pull requests

2 participants