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

Unable to install sfdx-git-delta in Jenkins file #217

Closed
akshay4570 opened this issue Dec 6, 2021 · 7 comments
Closed

Unable to install sfdx-git-delta in Jenkins file #217

akshay4570 opened this issue Dec 6, 2021 · 7 comments
Assignees
Labels
bug Something isn't working reproduction steps needed Need reproduction steps to further with the analysis

Comments

@akshay4570
Copy link

Unable to install the sfdx-git-delta plugin. I am getting the below error.

`/home/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_16x/lib/node_modules/sfdx-cli/node_modules/yarn/lib/cli.js:78764
    compromised = compromised || function (err) { throw err; };
                                                  ^

Error: Unable to update lock within the stale threshold
    at /home/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/NodeJS_16x/lib/node_modules/sfdx-cli/node_modules/yarn/lib/cli.js:78686:66
    at FSReqCallback.oncomplete (node:fs:188:23) {
  code: 'ECOMPROMISED'
}
    Error: yarn add sfdx-git-delta@latest --non-interactive 
    --mutex=file:/home/jenkins/.local/share/sfdx/yarn.lock 
    --preferred-cache-folder=/home/jenkins/.cache/sfdx/yarn --check-files 
    exited with code 1`

The code I am using to install the sfdx cli is
npm install sfdx-cli --global

The sfdx-cli version details are
sfdx-cli/7.129.0 linux-x64 node-v16.13.0

Command used to install sfdx-git-delta is
echo 'y' | sfdx plugins:install sfdx-git-delta

But still I am getting the error...

@akshay4570 akshay4570 added the bug Something isn't working label Dec 6, 2021
@scolladon
Copy link
Owner

Hi @akshay4570 !

Thanks for raising this issue, thanks for helping this plugin to be better !

I had a look on this error message and it seems to be related to the yarn version used.
Maybe you should look this way, it does not seems to be an issue with the plugin itself...

Let us know what you find ! It will help others too

@akshay4570
Copy link
Author

Hi @scolladon, I am getting the above error randomly. It works fine sometimes and the plugin gets installed but sometime it fails.
I can see a yarn.lock in your git repository, Does this happen because of that? As I don't yarn anywhere for installations I only use npm or sfdx commands

@scolladon
Copy link
Owner

It seems yarn is used internally in the sfdx cli to install plugins.
I don't know which version is used if it is not installed in your system (maybe an old one packaged with sfdx).
Could you try to setup the last version of yarn in your jenkins instance and see if it changed anything ?

@teotia32
Copy link

I faced the same issue and I had to go the previous version of sfdx delta to install and then it worked okay for me after that.
I used below command: echo 'y' | sfdx plugins:install sfdx-git-delta@4.10.0

@scolladon
Copy link
Owner

Hi @teotia32

I think your issue is linked to #223 which should be closed by now

Is it the case ?

@scolladon
Copy link
Owner

@akshay4570 do you have any information to help on this issue ?
Should we close it ?

@scolladon scolladon added the reproduction steps needed Need reproduction steps to further with the analysis label Dec 14, 2021
@akshay4570
Copy link
Author

Hi @scolladon the solution given by @teotia32 seems to work fine for now, I think we can close it and will revert back if any problem persists

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