scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
414 stars 112 forks source link

Generate delta command not working after migrating from sfdx to sf #746

Closed Tanvidh closed 5 months ago

Tanvidh commented 8 months ago

Issue verification check:

What is the problem?

SGD command fro generating git delta is failing after migrating sfdx to sf Version: Sf:2.11.8 SGD:5.10.0


Getting error for this command As error running SGD:source:delta : core_1.Flags.enum is not a function ### What is the parameter and the value you used with it?

What is the expected result?

Git delta should get generated

What is the actual result?

error ## Steps to reproduce ---

Execution context


Operating System:

yarn version:

node version:

git version:

sfdx version:

sgd plugin version:

More information (optional)


Tanvidh commented 8 months ago

Command used: Sfdx sgd:source:delta --to branchname --from $(git merge-base branchname) --repo . -outpu delta-source/ --generate-delta

scolladon commented 8 months ago

Hi @Tanvidh!

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

Could you try with the latest version of sgd please ? Also can you try with the --output parameter (instead of --outpu) please ?

Let us know what it changes

Tanvidh commented 8 months ago

Hi @scolladon , I tried using latest version for SGD 5.31.1 And command is also using --output.But still it is failing with same error Nodejs version:18.18.2 Npm version:10.0.0

scolladon commented 8 months ago

Thanks @Tanvidh, could you try uninstalling the plugin, uninstalling sf cli, and then reinstalling everything back please ?

Tanvidh commented 8 months ago

Hi @scolladon , We are using CI-CD pipeline which freshly installs the Salesforce cli with every run. Do you still want to try?. If yes,if it will work after uninstalling and reinstalling what if we move it main prod level.It would be affect all the pipelines?

Please suggest

scolladon commented 8 months ago

Thanks for the context of execution. Could you give us more details about it ? What kind of CI/CD ? What OS ?

On our github action pipeline checks, everything looks fine for any OS (mac, linux, windows) for node 18 and node 20.

Tanvidh commented 8 months ago

Hi @scolladon , It is Jenkins CI-CD pipeline.Where in we have Jenkins stage fro generating delta stage OS is linux-x64 Node 18

scolladon commented 8 months ago

Could you share the pipeline definition @Tanvidh ?

Here is a discussion about sgd installation on Jenkins. I don't know if it can help but we never know

Tanvidh commented 8 months ago

Hi @scolladon , Thanks but I am using same commands and everything looks fine from my side.Il share the pipeline file with you . Meanwhile I just wanted to understand regarding Jenkins node to be used to run node js 20 version and npm 18 version. Is their any dependency whether we need to use Rhel8 for running the node js > 16 and npm > 14. Iam using Rhel 8 node agent for running my code on Jenkins.Initially I tried using Linux-Aws but it was failing while installing node js version itself.

scolladon commented 8 months ago

Hi @Tanvidh,

I actually do not know what kind of Jenkins setup you need to have to use the plugin. I have never done that.

I found this documentation about how to setup Jenkins to support sfdx. I don't know if it works with sf.

We make sure the plugin supports the same node version as the sf cli does to ensure maximum compatibility

Tanvidh commented 7 months ago

Hi @scolladon -Jenkins setup is sorted as sfdx commands are working fine on Jenkins.After migration from sfdx to sf it was working fine.But as the node js version got updated we started facing issues. For now plugins have been installed correctly.its just failing in generate delta command

scolladon commented 7 months ago

Hi @Tanvidh,

Why it is failing in generate delta command ? What is the parameter used ? What is the output you have actually, and what is the output you expect ? How anyone could reproduce this ?

Tanvidh commented 7 months ago

It is failing with error as mentioned above Parameters used are source branch,target branch ,and output file.Command is also pasted above Expected output is package.xml gets created at specified location It's simple sfdx git delta plugin wherein generate delta command is used.

scolladon commented 7 months ago

Ok @Tanvidh, thanks Just to be sure, you are not experiencing the same issue locally, right ? If so, I would try reinstalling everything. Make sure it has node 18 or 20, git latest and yarn.

Tanvidh commented 7 months ago

I will try to install locally.But local system is windows and Jenkins is using Linux.So iam trying directly onto Jenkins. Git version is 2.39.2 Yarn:1.22.21 Nodejs:tried both 18 and 20

Tanvidh commented 7 months ago

Hi @scolladon Any update on this?

scolladon commented 7 months ago

Not on my side.

I am not able to reproduce the issue. And others have been able to install sfdx cli and sgd on jenkins.

There may be something special with your installation / environment / jenkins setup I am afraid without poking around I won't be able to help as I don't see much "unusual" things here

scolladon commented 7 months ago

Hi @Tanvidh

Do you have an update on your situation here ?

Tanvidh commented 6 months ago

@scolladon Can we connect for this issue?.Iam still facing issues with the plugin.Please share the details

scolladon commented 6 months ago

Yes sure, we can connect, my email is public on my profile, we could arrange a screen share next week

scolladon commented 5 months ago

Hi @Tanvidh !

Do you still have the issue ? How can I help here ?

Tanvidh commented 5 months ago

Hi @scolladon -Thanks it's resolved for me .I had to add an extra package @salesforce/source-deply-retrieve in package.json and the issue got resolved.

scolladon commented 5 months ago

That's great news @Tanvidh !

Where did you have to add this extra package ? Maybe your issue is linked to this one and is fixed without having you to add this extra package