Closed bmehtawebsummit closed 1 month ago
Hi @bmehtawebsummit!
Thanks for raising this issue and thanks for contributing in making this project better!
I can see warnings but no errors. And the only warning that I could address is the one referring to the api version parameter ((node:167) Warning: Deprecated config name: apiVersion. Please use org-api-version instead._). This issue with the api version parameter is tracked in the issue #619 (maybe it is a duplicate)
Could you provide more information please ? What is the actual error ? How can I reproduce ?
HI @scolladon ,
Thanks for giving reference of the issue. So what I understood is the warning can be ignored ? for the warning below
_
((node:167) Warning: Deprecated config name: apiVersion. Please use org-api-version instead.).``
I am not using apiVersion config name in my entire script anywhere, I have double checked SGD command, putting below for your reference.
sfdx sgd:source:delta --from $(git describe --match "${ORG_NAME}-*" --abbrev=0 --tags HEAD) --to HEAD --output . --ignore .forceignore --api-version "${API_VERSION}"
If the warning can be ignored then I have a real issue that after sfdx sgd:source:delta command a package xml is generated but
sfdx force:source:deploy -x ${PACKAGE_XML_PATH} -w 30 -u ${SF_USERNAME}
command right after that is deploying more than specific in the package/package.xml. So I was wondering if this has something to do with the warning I am seeing. This mainly happens when I am trying to create/update a field. It tried to deploy the entire object where previously it use to deploy just a field.
Hum...
I think the plugin may have added the SObject in the package.xml, this is why then it could try to deploy the full object. The plugin add the parent SObject when a master detail fields is added/modified and also add the master detail field when the parent SObject is modified. This is because of this known issue
Could you show the diff (git diff --name-status --no-renames <from> <to>
) and the content of the package.xml please ?
HI @scolladon
Sorry for the delay.
For eg : I made a description adjustment on a field Cost__c on account object
the output of git --no-pager diff --name-status HEAD prod-20240905110838 is M force-app/main/default/objects/Account/fields/Cost__c.field-meta.xml
Package XML is <?xml version="1.0" encoding="UTF-8"?>
It is still attempting to deploy the entire object
That is weird...
Based on those new information I would say the plugin as done its job correctly.
The package.xml generated is expected.
What is concerning is the deploy command is deploying the whole object when asking to only deploy a field.
What is the command used to deploy ?
sfdx force:source:deploy -x package/package.xml -w 30 -u ** -c -l RunSpecifiedTests -r NoTestRun
sfdx force:source:deploy -x package/package.xml -w 30 -u ** -c -l RunSpecifiedTests -r NoTestRun
I think this bug is located on the sfdx cli itself then...
I think the plugin has done its job and you would experience the same result if you build the package.xml
by hand and try to deploy it.
If you agree I'll close this one if you can drop the issue created on the cli I'll follow it
Hi @scolladon
I am raising ticket with salesforce cli but I wanted to confirm if my understanding is correct that SGD is still working on SFDX command? sfdx commands have been deprecated and will be removed on Nov 2024 as per this link https://github.com/forcedotcom/cli/issues/2974
Please advise what is your plan on migration and what would you advise to me that should I check for SFDX or try changing to sf command ?
Hi @bmehtawebsummit,
We are migrating soon to the new plugin v2 architecture. The actual command line is both compatible with sfdx cli and sf cli. After migrating it will still be the case as well.
I think you should migrate to sf command 👍
I tried
sf sgd source delta --from $(git describe --match "${ORG_NAME}-*" --abbrev=0 --tags HEAD) --to HEAD --output . --ignore .forceignore --api-version "${API_VERSION}"
and getting following error
› Warning: sgd source delta is not a sf command. Did you mean force source delete? (Y/n) › Error: Run sf help for a list of available commands.
Have you tried sf sgd:source:delta ...
?
yes, I tried that too.
I tried this command sf sgd:source:delta --help
and that also did not work
What you can do is:
sf
clisfdx
compatibility command shipped with sf
cli installationWe are currently working on migrating to the plugin v2 architecture.
It will work with sf
command soon
Hi,
I have written following in my docker file :
RUN npm install @salesforce/cli --global RUN sf --version RUN sf plugins install sfdx-git-delta RUN sf plugins
Please let me know what should I change here?
Nothing to change here
When you install @salesforce/cli you have both sf
and sfdx
compatibility command
Then you can use sgd with the sfdx
command
thanks for your help
Issue verification check:
What is the problem?
What is the parameter and the value you used with it?
What is the expected result?
What is the actual result?
Steps to reproduce
Execution context
Operating System: … Docker
yarn version: …
node version: …v20.17.0
git version: …git version 2.45.2
sfdx version: …sfdx-cli/47.15.1 linux-x64 node-v20.17.0
sgd plugin version: … should be the latest
More information (optional)