-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Update workerpool #203
Update workerpool #203
Changes from all commits
7de6ddc
5ea8746
5e533e2
355051d
8234774
00ef732
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
* text eol=lf | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
|
||
# JS files should always have LF line endings on checkout. | ||
*.js text eol=lf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'v*' # older version branches | ||
tags: | ||
- '*' | ||
|
||
pull_request: {} | ||
schedule: | ||
- cron: '0 6 * * 0' # weekly, on sundays | ||
|
||
jobs: | ||
test: | ||
name: "Node ${{ matrix.node }} - ${{ matrix.os }}" | ||
runs-on: "${{matrix.os}}-latest" | ||
|
||
strategy: | ||
matrix: | ||
os: ['ubuntu', 'windows', 'macOS'] | ||
node: ['10', '12', '14'] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: test | ||
run: yarn test | ||
|
||
floating-test: | ||
name: Floating dependencies | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- name: install dependencies | ||
run: yarn install --no-lockfile | ||
- name: test | ||
run: yarn test | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,10 @@ function getWorkerPool() { | |
if (existingPool) { | ||
pool = existingPool; | ||
} else { | ||
pool = workerpool.pool(path.join(__dirname, 'worker.js'), { maxWorkers: JOBS }); | ||
pool = workerpool.pool(path.join(__dirname, 'worker.js'), { | ||
maxWorkers: JOBS, | ||
workerType: 'process' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why force There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. well tests fail if we don't 😂 I don't really understand why, I was trying to do the minimum effort to get this passing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thread is the preferred approach here... fallback to process only when absolutely needed. |
||
}); | ||
process[globalPoolID] = pool; | ||
} | ||
return pool; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ | |
"heimdalljs-logger": "^0.1.7", | ||
"json-stable-stringify": "^1.0.0", | ||
"rsvp": "^4.8.2", | ||
"workerpool": "^2.3.0" | ||
"workerpool": "^6.1.4" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is breaking in a way that we typically do not do... 🤔 Specifically, this is changing an old major to drop support for a Node major version with the expectation of releasing without a breaking change indication. This is likely to cause exactly the kind of breakage you are trying to fix (introduced CI failures). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So I wasn't intending to drop support for any node version 🤔 the idea was that the tests should still check the correct Node version. I guess technically because workerpool aren't testing against our supported Node versions they could break older ones at any time, is that what you mean? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes, exactly. They could update to (for example) async/await syntax, which would be breaking for Node 8 users (which ember-cli-babel@6 still supports). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, the right fix (as I mentioned in #203 (review)) is to disable parallelizing when running on Node 16. It is the least invasive change, and has the least likely hood of breaking folks. |
||
}, | ||
"devDependencies": { | ||
"amd-name-resolver": "1.2.0", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn’t test node 16 (which is theoretically the point?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right I should have added that. I'll split the CI stuff and then add 16 in this PR when it's rebased 👍