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

fix: abort branch if child process receives SIGTERM #8992

Merged
merged 1 commit into from Mar 4, 2021
Merged

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Mar 4, 2021

Changes:

Detects when child process fails due to SIGTERM and aborts the branch.

Context:

Trying to handle this gracefully as an alternative to:

{
  "level": 20,
  "branch": "renovate/npm-lodash-vulnerability",
  "err": {
    "killed": false,
    "code": null,
    "signal": "SIGTERM",
    "cmd": "docker pull docker.io/renovate/node:latest",
    "stdout": "latest: Pulling from renovate/node\n5d3b2c2d21bb: Pulling fs layer\n3fc2062ea667: Pulling fs layer\n75adf526d75b: Pulling fs layer\n8fac8f7ae834: Pulling fs layer\nbd2f495a6dc9: Pulling fs layer\n5cb6cb04bade: Pulling fs layer\na0d68e40d167: Pulling fs layer\n9bfa22e90d01: Pulling fs layer\n7b5f4722109c: Pulling fs layer\n8fac8f7ae834: Waiting\nbd2f495a6dc9: Waiting\n5cb6cb04bade: Waiting\na0d68e40d167: Waiting\n9bfa22e90d01: Waiting\n7b5f4722109c: Waiting\n3fc2062ea667: Verifying Checksum\n3fc2062ea667: Download complete\n75adf526d75b: Verifying Checksum\n75adf526d75b: Download complete\nbd2f495a6dc9: Verifying Checksum\nbd2f495a6dc9: Download complete\n8fac8f7ae834: Verifying Checksum\n8fac8f7ae834: Download complete\n5d3b2c2d21bb: Verifying Checksum\n5d3b2c2d21bb: Download complete\n9bfa22e90d01: Verifying Checksum\n9bfa22e90d01: Download complete\n",
    "stderr": "",
    "message": "Command failed: docker pull docker.io/renovate/node:latest\n",
    "stack": "Error: Command failed: docker pull docker.io/renovate/node:latest\n\n    at ChildProcess.exithandler (child_process.js:308:12)\n    at ChildProcess.emit (events.js:315:20)\n    at ChildProcess.EventEmitter.emit (domain.js:467:12)\n    at maybeClose (internal/child_process.js:1048:16)\n    at Socket.<anonymous> (internal/child_process.js:439:11)\n    at Socket.emit (events.js:315:20)\n    at Socket.EventEmitter.emit (domain.js:467:12)\n    at Pipe.<anonymous> (net.js:673:12)"
  },
  "type": "npm",
  "msg": "lock file error",
  "time": "2021-03-04T16:41:19.441Z"
}

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • No new tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins rarkins requested a review from viceice March 4, 2021 21:16
@rarkins rarkins enabled auto-merge (squash) March 4, 2021 21:21
@rarkins rarkins merged commit 1b673c9 into master Mar 4, 2021
@rarkins rarkins deleted the fix/sigterm branch March 4, 2021 21:27
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 24.72.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants