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

Mark maxWorkers as optional #8848

Merged
merged 3 commits into from
Oct 26, 2019
Merged

Mark maxWorkers as optional #8848

merged 3 commits into from
Oct 26, 2019

Conversation

G-Rath
Copy link
Contributor

@G-Rath G-Rath commented Aug 18, 2019

Currently maxWorkers in InitialConfig is marked as required, which means normalize is being used in an "unsafe" manner in some places.

Meanwhile getMaxWorkers ensures this value is set in normalise.

I don't think this needs a changelog entry as it's an internal change - externally maxWorkers is technically already optional.

@SimenB
Copy link
Member

SimenB commented Aug 19, 2019

Everything in InitialOptions is optional. Could you instead remove all the ? and just make it Partial?

@SimenB
Copy link
Member

SimenB commented Aug 19, 2019

TS did not appreciate rootDir being made optional... Seems like we'll need to adjust normalize as well

@G-Rath
Copy link
Contributor Author

G-Rath commented Aug 22, 2019

I suspect this might fail, b/c something will probably be depending on the mutation of the original options object that's passed to normalize.

@SimenB Happy to remove the reliance on mutation if it exists, but if you want to keep it I should just be able to do Object.assign(initialOptions, options) to fix it 🙂

Seems nothing was relying on the mutation - yay!

@G-Rath
Copy link
Contributor Author

G-Rath commented Aug 22, 2019

@jeysal The mac build passed all the tests, but failed w/ exit code 1 &:

error‌ Command failed with signal "SIGSEGV".‌

Do you think this could be what's happening in my other PR, & CircleCI just isn't reporting the signal that the command failed w/?


Eitherway, I don't have a Mac, so not too sure how to fix this 😕

(just in case I want to find it again)

@jeysal
Copy link
Contributor

jeysal commented Aug 22, 2019

Idk, in the other one all jobs are failing so I don't think it's related. I also don't see the SIGSEGV anywhere, maybe I'm missing something

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

Seems sensible to me. Mind updating the changelog as well?

@SimenB SimenB requested a review from jeysal October 26, 2019 08:12
@G-Rath
Copy link
Contributor Author

G-Rath commented Oct 26, 2019

@SimenB No problem - I'm hoping that the SEGFAULT will magically not happen again 😬

🎉 No segfault! 🎉

I'm also rebasing my snapshot branch, which'll hopefully not have problems with.

If you don't mind me taking advantage of your attention, have you had a chance to look over my comment about doing releases on eslint-plugin-jest?

@codecov-io
Copy link

codecov-io commented Oct 26, 2019

Codecov Report

Merging #8848 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8848      +/-   ##
==========================================
- Coverage   64.72%   64.71%   -0.02%     
==========================================
  Files         277      277              
  Lines       11706    11706              
  Branches     2874     2875       +1     
==========================================
- Hits         7577     7575       -2     
- Misses       3512     3514       +2     
  Partials      617      617
Impacted Files Coverage Δ
packages/jest-config/src/normalize.ts 81.23% <100%> (ø) ⬆️
packages/jest-environment-node/src/index.ts 48.57% <0%> (-8.58%) ⬇️
packages/jest-test-sequencer/src/index.ts 91.66% <0%> (+2.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8862ec3...6d9a328. Read the comment docs.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
@SimenB
Copy link
Member

SimenB commented Oct 26, 2019

thanks for the patience!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

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

Successfully merging this pull request may close these issues.

5 participants