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(sandbox): catch exit errors #2800

Merged
merged 8 commits into from
Oct 7, 2024
Merged

Conversation

roggervalf
Copy link
Collaborator

@roggervalf roggervalf commented Oct 5, 2024

When exit errors happened too soon, promises were never resolved. This PR prevents that behavior.

@@ -40,7 +40,8 @@ export class ChildPool {
workerForkOptions: this.opts.workerForkOptions,
workerThreadsOptions: this.opts.workerThreadsOptions,
});
child.on('exit', this.remove.bind(this, child));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the past, we are removing this child in this handler but in sandbox file, depending on exit error we are removing or releasing. Removing this logic and handling it in sandbox

@@ -1050,7 +1092,7 @@ function sandboxProcessTests(
});
});

it('should remove exited process', async () => {
it('should release exited process', async () => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as my comment above, this test case changes as it's not removing but releasing

Copy link
Contributor

@manast manast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@roggervalf roggervalf merged commit 6babb9e into master Oct 7, 2024
11 checks passed
@roggervalf roggervalf deleted the sandbox-catch-exit-errors branch October 7, 2024 15:53
github-actions bot pushed a commit that referenced this pull request Oct 7, 2024
# [5.17.0](v5.16.0...v5.17.0) (2024-10-07)

### Bug Fixes

* **sandbox:** catch exit errors ([#2800](#2800)) ([6babb9e](6babb9e))

### Features

* **job:** add deduplication logic ([#2796](#2796)) ([0a4982d](0a4982d))
alexandresoro pushed a commit to alexandresoro/ouca that referenced this pull request Oct 7, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [bullmq](https://bullmq.io/) ([source](https://github.com/taskforcesh/bullmq)) | dependencies | minor | [`5.16.0` -> `5.17.1`](https://renovatebot.com/diffs/npm/bullmq/5.16.0/5.17.1) |

---

### Release Notes

<details>
<summary>taskforcesh/bullmq (bullmq)</summary>

### [`v5.17.1`](https://github.com/taskforcesh/bullmq/releases/tag/v5.17.1)

[Compare Source](taskforcesh/bullmq@v5.17.0...v5.17.1)

##### Bug Fixes

-   **repeat:** also consider startDate when using "every" ([25bbaa8](taskforcesh/bullmq@25bbaa8))

### [`v5.17.0`](https://github.com/taskforcesh/bullmq/releases/tag/v5.17.0)

[Compare Source](taskforcesh/bullmq@v5.16.0...v5.17.0)

##### Bug Fixes

-   **sandbox:** catch exit errors ([#&#8203;2800](taskforcesh/bullmq#2800)) ([6babb9e](taskforcesh/bullmq@6babb9e))

##### Features

-   **job:** add deduplication logic ([#&#8203;2796](taskforcesh/bullmq#2796)) ([0a4982d](taskforcesh/bullmq@0a4982d))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMTAuMiIsInVwZGF0ZWRJblZlciI6IjM4LjExMC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->

Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/201
Reviewed-by: Alexandre Soro <[email protected]>
Co-authored-by: renovate <[email protected]>
Co-committed-by: renovate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants