Skip to content

fix(config): throw on workers=0 or negative value#39992

Closed
bwyard wants to merge 1 commit intomicrosoft:mainfrom
bwyard:fix-39938
Closed

fix(config): throw on workers=0 or negative value#39992
bwyard wants to merge 1 commit intomicrosoft:mainfrom
bwyard:fix-39938

Conversation

@bwyard
Copy link
Copy Markdown
Contributor

@bwyard bwyard commented Apr 1, 2026

  • `--workers=0` and `--workers=-1` via CLI bypassed validation and resolved silently, causing an empty test run that exits 0
  • `resolveWorkers` only guarded against NaN, not <= 0
  • config-file path already throws (configLoader.ts:325) but CLI override path did not

Fixes #39938

- --workers=0 and --workers=-1 via CLI bypassed validation and resolved silently,
  causing an empty test run that exits 0
- resolveWorkers only guarded against NaN, not <= 0
- config-file path already throws (configLoader.ts:325) but CLI override path did not

Fixes microsoft#39938
@bwyard
Copy link
Copy Markdown
Contributor Author

bwyard commented Apr 1, 2026

Perfect I need to double check my employment contract today/tomorrow as I am an employed sdet so I'll have one of the two done tomorrow. I know I have permission to contribute but can't remember if my contract gives them ownership or not.

@bwyard
Copy link
Copy Markdown
Contributor Author

bwyard commented Apr 1, 2026

@microsoft-github-policy-service agree

@Skn0tt
Copy link
Copy Markdown
Member

Skn0tt commented Apr 2, 2026

there's already an open PR about this here, btw: #39940

@bwyard
Copy link
Copy Markdown
Contributor Author

bwyard commented Apr 2, 2026

Oh dang I didn't see the pr attached to the issue but that's fair can go ahead and close then my bad.

@bwyard bwyard closed this Apr 3, 2026
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.

[Bug]: Test run with parameter workers=0 (or a negative number) is treated as successful

2 participants