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

Updates to the packageManager digest fail on project with private dependencies #32116

Open
rarkins opened this issue Oct 24, 2024 Discussed in #32098 · 0 comments
Open

Updates to the packageManager digest fail on project with private dependencies #32116

rarkins opened this issue Oct 24, 2024 Discussed in #32098 · 0 comments
Assignees
Labels
manager:npm package.json files (npm/yarn/pnpm) priority-2-high Bugs impacting wide number of users or very important features type:bug Bug fix of existing functionality

Comments

@rarkins
Copy link
Collaborator

rarkins commented Oct 24, 2024

Discussed in #32098

Originally posted by wtrep October 22, 2024

How are you running Renovate?

A Mend.io-hosted app

If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.

No response

Please tell us more about your question or problem

Updates to the packageManager digest fails on projects with private dependencies.

Reproduction: corepack-private-repo-npmrc-reproduction.

We can see that renovate will run corepack use [email protected] to update the pnpm digest. The command fails because it is executed before the .npmrc file is generated.

This is not an issue with the .npmrc file as updates to private dependencies are working as expected (see Update dependency @private/dependency to v1.0.1).

Logs (if relevant)

Logs
DEBUG: Executing command (branch="renovate/pnpm-9.x")
{
  "command": "corepack use [email protected]"
}

DEBUG: rawExec err (branch="renovate/pnpm-9.x")
{
  "err": {
    "cmd": "/bin/sh -c corepack use [email protected]",
    "stderr": "",
    "stdout": "Installing [email protected] in the project...\n\nLockfile is up to date, resolution step is skipped\nProgress: resolved 1, reused 0, downloaded 0, added 0\nPackages: +1\n+\n ERR_PNPM_FETCH_404  GET https://**redacted**@private/dependency/-/dependency-1.0.0.tgz: Not Found - 404\n\nNo authorization header was set for the request.\n",
    "options": {
      "cwd": "/tmp/renovate/repos/github/wtrep/corepack-private-repo-npmrc-reproduction",
      "encoding": "utf-8",
      "env": {
        "HOME": "/home/ubuntu",
        "PATH": "/home/ubuntu/.local/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/home/ubuntu/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "LC_ALL": "C.UTF-8",
        "LANG": "C.UTF-8",
        "CONTAINERBASE_CACHE_DIR": "/tmp/renovate/cache/containerbase"
      },
      "maxBuffer": 10485760,
      "timeout": 900000
    },
    "exitCode": 1,
    "name": "ExecError",
    "message": "Command failed: corepack use [email protected]\n",
    "stack": "ExecError: Command failed: corepack use [email protected]\n\n    at ChildProcess.<anonymous> (/usr/local/renovate/lib/util/exec/common.ts:101:11)\n    at ChildProcess.emit (node:events:531:35)\n    at ChildProcess.emit (node:domain:488:12)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)"
  }
  "durationMs": 1738
}

WARN: Error updating package.json (branch="renovate/pnpm-9.x")
{
  "err": {
    "cmd": "/bin/sh -c corepack use [email protected]",
    "stderr": "",
    "stdout": "Installing [email protected] in the project...\n\nLockfile is up to date, resolution step is skipped\nProgress: resolved 1, reused 0, downloaded 0, added 0\nPackages: +1\n+\n ERR_PNPM_FETCH_404  GET https://**redacted**@private/dependency/-/dependency-1.0.0.tgz: Not Found - 404\n\nNo authorization header was set for the request.\n",
    "options": {
      "cwd": "/tmp/renovate/repos/github/wtrep/corepack-private-repo-npmrc-reproduction",
      "encoding": "utf-8",
      "env": {
        "HOME": "/home/ubuntu",
        "PATH": "/home/ubuntu/.local/bin:/home/ubuntu/bin:/home/ubuntu/.local/bin:/home/ubuntu/bin:/home/ubuntu/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
        "LC_ALL": "C.UTF-8",
        "LANG": "C.UTF-8",
        "CONTAINERBASE_CACHE_DIR": "/tmp/renovate/cache/containerbase"
      },
      "maxBuffer": 10485760,
      "timeout": 900000
    },
    "exitCode": 1,
    "name": "ExecError",
    "message": "Command failed: corepack use [email protected]\n",
    "stack": "ExecError: Command failed: corepack use [email protected]\n\n    at ChildProcess.<anonymous> (/usr/local/renovate/lib/util/exec/common.ts:101:11)\n    at ChildProcess.emit (node:events:531:35)\n    at ChildProcess.emit (node:domain:488:12)\n    at Process.ChildProcess._handle.onexit (node:internal/child_process:294:12)"
  }
}

DEBUG: Updated 1 package files (branch="renovate/pnpm-9.x")
DEBUG: Getting updated lock files (branch="renovate/pnpm-9.x")
DEBUG: Writing package.json files (branch="renovate/pnpm-9.x")
{
  "packageFiles": [
    "package.json"
  ]
}

DEBUG: Writing any updated package files (branch="renovate/pnpm-9.x")
DEBUG: Writing package.json (branch="renovate/pnpm-9.x")
DEBUG: Found 1 npm host rule(s) (branch="renovate/pnpm-9.x")
DEBUG: Adding npmrc entry for //**redacted** with key _authToken (branch="renovate/pnpm-9.x")
DEBUG: npmrc file .npmrc found in repository (branch="renovate/pnpm-9.x")
DEBUG: Writing updated .npmrc file to .npmrc (branch="renovate/pnpm-9.x")
@rarkins rarkins added type:bug Bug fix of existing functionality priority-2-high Bugs impacting wide number of users or very important features manager:npm package.json files (npm/yarn/pnpm) labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:npm package.json files (npm/yarn/pnpm) priority-2-high Bugs impacting wide number of users or very important features type:bug Bug fix of existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants