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

Problem installing sfdx-git-delta #681

Closed
1 task done
josme12698 opened this issue Aug 29, 2023 · 10 comments
Closed
1 task done

Problem installing sfdx-git-delta #681

josme12698 opened this issue Aug 29, 2023 · 10 comments
Assignees
Labels
bug Something isn't working reproduction steps needed Need reproduction steps to further with the analysis

Comments

@josme12698
Copy link

josme12698 commented Aug 29, 2023

Issue verification check:

  • is the current repository fully deployable at the commit SHA provided with the 'from' parameter of the command?

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:

yarn version:

node version: node:20.0.0

git version:

sfdx version: 7.209.6-8ba3197

sgd plugin version:

@josme12698 josme12698 added the bug Something isn't working label Aug 29, 2023
@scolladon
Copy link
Owner

Hi @josme12698 !

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

What is the issue ?
What is the plugin version, the os type, the git version and the yarn version ?

@scolladon scolladon added the reproduction steps needed Need reproduction steps to further with the analysis label Aug 30, 2023
@josme12698
Copy link
Author

Hi @scolladon
I'm so sorry, I thought I had uploaded an image with the problem. There is more information.

We are having problem in our gitlab pipeline.
We have been using this plugin without any problems. But since yesterday this step in our pipeline gitlab is failing.

generate-delta-package:
stage: generate-delta-package
script:
- export CLIURL=https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz
- mkdir sfdx
- wget -qO- $CLIURL | tar xJ -C sfdx --strip-components 1
- "./sfdx/install"
- export PATH=./sfdx/$(pwd):$PATH
- echo "install SFDX-Git-Delta plugin - https://github.com/scolladon/sfdx-git-delta"
- sfdx update
- echo 'y' | sfdx plugins:install sfdx-git-delta
- git fetch origin "+refs/heads/:refs/remotes/origin/"
- if [[ $COMMIT_PACKAGE == yes ]]; then
- sfdx sgd:source:delta --to "$BRANCH_TARGET" --from $CI_COMMIT_FROM --output .
- else
- sfdx sgd:source:delta --to origin/"$CI_COMMIT_REF_NAME" --from $BRANCH_TARGET --repo . --output .
- fi
- echo "--- package.xml Generated with added and modified metadata ---"
- cat package/package.xml
- echo "--- destructiveChanges.xml generated with added and modified metadata ---"
- cat destructiveChanges/destructiveChanges.xml
artifacts:
paths:
- package/package.xml
- destructiveChanges/destructiveChanges.xml

    Specifically in this script echo 'y' | sfdx plugins:install sfdx-git-delta when is running is failing indicated this.

install SFDX-Git-Delta plugin - https://github.com/scolladon/sfdx-git-delta
$ echo 'y' | sfdx plugins:install sfdx-git-delta
Finished digital signature check.
This plugin is not digitally signed and its authenticity cannot be verified. Continue installation y/n?: Installing plugin sfdx-git-delta... yarn add v1.22.10
Installing plugin sfdx-git-delta... info No lockfile found.Installing plugin sfdx-git-delta... [1/4] Resolving packages...Installing plugin sfdx-git-delta... [2/4] Fetching packages...Installing plugin sfdx-git-delta... info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.Installing plugin sfdx-git-delta... failed
warning sfdx-git-delta > @salesforce/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
error [email protected]: The engine "node" is incompatible with this module. Expected version ">=14.14". Got "12.18.3"
error Found incompatible module.
Error: yarn add sfdx-git-delta@latest --non-interactive
--mutex=file:/root/.local/share/sfdx/yarn.lock
--preferred-cache-folder=/root/.cache/sfdx/yarn --check-files exited with
code 1

Just let me know if you need any additional information.

@scolladon
Copy link
Owner

Thanks for those information.

It seems the issue comes from the node version (The engine "node" is incompatible with this module. Expected version ">=14.14". Got "12.18.3").
It can come from multiple places.

  • from the actual node version installed.
  • from the node version coming with the cli when installed from the download url.

My suggestion would be to use node lts and to install the cli via npm (npm install -g sfdx-cli).

Do you have those information ($ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins):
Operating System: …
yarn version: …
node version: ...
git version: …
sfdx version: ...
sgd plugin version: …

@scolladon
Copy link
Owner

Closing this issue, feel free to reopen it if you have more information to share

@pietroz123
Copy link

I'm having the same issue installing the plugin. Can someone help? Thanks a lot!

image

@scolladon
Copy link
Owner

Hi @pietroz123

Sorry to ear that, could you share the exact issue you have please ?

Sometimes (I don't know why), but uninstalling sfdx and reinstalling it unblock the plugin installation.

@scolladon scolladon reopened this Feb 20, 2024
@pietroz123
Copy link

Hi @scolladon , thanks for the quick response. The issue is the same @josme12698 had. Please see below:

sfdx plugins:install sfdx-git-delta
 ›   Warning: @salesforce/cli update available from 2.23.20 to 2.28.6.
? This plugin isn't signed by Salesforce. Only install the plugin if you trust its creator. Do you want to continue the installation?, Yes
Because you approved this plugin, you can avoid future installation confirmations by adding the plugin to the unsignedPluginAllowList.json file. For details, see https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_allowlist.htm.
Finished digital signature check.
Installing plugin sfdx-git-delta@latest... failed
 ›   Warning: sfdx-git-delta > @salesforce/[email protected]: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
    Error: /usr/local/lib/node_modules/@salesforce/cli/node_modules/yarn/bin/yarn.js add sfdx-git-delta@latest --non-interactive --mutex=file:/Users/pietrozuntini/.local/share/sf/yarn.lock --preferred-cache-folder=/Users/pietrozuntini/Library/Caches/sf/yarn --check-files exited with 
    code 1

@scolladon
Copy link
Owner

Ok, could you update sfdx cli and try again please ?
I want to make sure you are up to date with everything

@pietroz123
Copy link

Hi @scolladon !

I've updated sfdx and it still didn't work. But then I used sudo and the plugin was installed, but I still got warnings, I guess sudo just bypassed them. Here is the output:

image

Also, when executing the command to get the diff, although it worked and generated both the package and destructiveChanges folders with the correct files, I also got and warning:

sfdx sgd:source:delta --from origin/master --output "." 
(node:36056) Warning: Deprecated config name: apiVersion. Please use org-api-version instead.
(Use `node --trace-warnings ...` to show where the warning was created)
{
  "error": null,
  "output": ".",
  "success": true,
  "warnings": []
}

In conclusion, it worked but I thought I'd send you the warnings just in case. Maybe with a clean installation when I have the time the warnings will disappear.

Thanks!

@scolladon
Copy link
Owner

Thanks for the information @pietroz123
Too bad it requires you to install the plugin with sudo, maybe the sfdx cli has been installed with sudo and that's why you also need sudo to install plugins.

Thanks for the warnings as well, we have another issue to track it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproduction steps needed Need reproduction steps to further with the analysis
Projects
None yet
Development

No branches or pull requests

3 participants