renovatebot / app-support

Discussion/support issues for the hosted Renovate App
0 stars 0 forks source link

Lock file maintenance not working for composer #19

Closed ThibaultVlacich closed 4 years ago

ThibaultVlacich commented 4 years ago

What Renovate type are you using?

Hosted app, GitHub.

Describe the bug

I'm getting this error in my lock file maintenance PR:

:warning: Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

:recycle: Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you check the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: server/composer.lock
Command failed: composer install --ignore-platform-reqs --no-ansi --no-interaction --no-scripts --no-autoloader
/bin/sh: 1: composer: not found

Did you see anything helpful in debug logs?

INFO: Manual rebase requested via PR checkbox for renovatebot/renovate#107(branch="renovate/lock-file-maintenance")
DEBUG: Using parentBranch: undefined(branch="renovate/lock-file-maintenance")
DEBUG: manager.getUpdatedPackageFiles()(branch="renovate/lock-file-maintenance")
DEBUG: composer.updateArtifacts(server/composer.json)(branch="renovate/lock-file-maintenance")
DEBUG: Using composer cache /tmp/renovate-cache/others/composer(branch="renovate/lock-file-maintenance")
INFO: Running composer via global composer(branch="renovate/lock-file-maintenance")
DEBUG: composer command(branch="renovate/lock-file-maintenance")
{
  "cmd": "composer",
  "args": "install --ignore-platform-reqs --no-ansi --no-interaction --no-scripts --no-autoloader"
}
DEBUG: Failed to generate composer.lock(branch="renovate/lock-file-maintenance")
{
  "err": {
    "killed": false,
    "code": 127,
    "signal": null,
    "cmd": "composer install --ignore-platform-reqs --no-ansi --no-interaction --no-scripts --no-autoloader",
    "stdout": "",
    "stderr": "/bin/sh: 1: composer: not found\n",
    "message": "Command failed: composer install --ignore-platform-reqs --no-ansi --no-interaction --no-scripts --no-autoloader\n/bin/sh: 1: composer: not found\n",
    "stack": "Error: Command failed: composer install --ignore-platform-reqs --no-ansi --no-interaction --no-scripts --no-autoloader\n/bin/sh: 1: composer: not found\n\n    at ChildProcess.exithandler (child_process.js:294:12)\n    at ChildProcess.emit (events.js:198:13)\n    at ChildProcess.EventEmitter.emit (domain.js:448:20)\n    at maybeClose (internal/child_process.js:982:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)"
  }
}
rarkins commented 4 years ago

I've worked out the root cause for this. It's because npm and composer are being combined into the same branch. In the app npm is set to use the embedded npm while composer needs to use the Docker version. The npm setting "wins" but then composer fails to find a global composer instead of dockerized. I need to think more on how to resolve this, sorry.

rarkins commented 4 years ago

Hi, just an update. If you can separate out your npm and composer PRs then this should work. Let me know if that would work for you and if so then I'll advise on config.

ThibaultVlacich commented 4 years ago

Locfile maintenance is now working properly for both npm and composer, I didn't have to change anything to my config.