Skip to content

buck2/oss: use 4 threads to run tests in CircleCI on Windows#371

Closed
KapJI wants to merge 1 commit into
facebook:mainfrom
KapJI:export-D47917932
Closed

buck2/oss: use 4 threads to run tests in CircleCI on Windows#371
KapJI wants to merge 1 commit into
facebook:mainfrom
KapJI:export-D47917932

Conversation

@KapJI

@KapJI KapJI commented Jul 31, 2023

Copy link
Copy Markdown
Contributor

Differential Revision: D47917932

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jul 31, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47917932

1 similar comment
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47917932

KapJI added a commit to KapJI/buck2 that referenced this pull request Jul 31, 2023
…#371)

Summary:
Reduce number of parallel doctests from 16 to 1.

This is supposed to help with doctests flakiness on Windows.

The error is coming from here:
https://github.com/rust-lang/rust/blob/b321edd1b2d4bd00c7b4611e8f20a03ee7b77023/compiler/rustc_metadata/src/fs.rs#L45-L53

Comment says they create temporary file to prevent races but I think there is still some race with Windows filesystem. If this doesn't help I'd probably reduce it to single thread.

Doctests don't obey `CARGO_BUILD_JOBS` and `--test-threads` argument needs to be used instead: rust-lang/cargo#10702

Pull Request resolved: facebook#371

Differential Revision: D47917932

fbshipit-source-id: 048484a2f76bc21b43a6ebcf9193d12f85690191
@KapJI KapJI force-pushed the export-D47917932 branch from 92bf82c to 4812d61 Compare July 31, 2023 17:29
KapJI added a commit to KapJI/buck2 that referenced this pull request Aug 1, 2023
…#371)

Summary:
Reduce number of parallel doctests from 16 to 1.

This is supposed to help with doctests flakiness on Windows.

The error is coming from here:
https://github.com/rust-lang/rust/blob/b321edd1b2d4bd00c7b4611e8f20a03ee7b77023/compiler/rustc_metadata/src/fs.rs#L45-L53

Comment says they create temporary file to prevent races but I think there is still some race with Windows filesystem. If this doesn't help I'd probably reduce it to single thread.

Doctests don't obey `CARGO_BUILD_JOBS` and `--test-threads` argument needs to be used instead: rust-lang/cargo#10702

Pull Request resolved: facebook#371

Differential Revision: D47917932

fbshipit-source-id: 0e8fa1cadd0916be7646e3180b7f06f44f5dab9d
@KapJI KapJI force-pushed the export-D47917932 branch from 4812d61 to 401b1fc Compare August 1, 2023 09:35
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47917932

Summary:
This helps to eliminate flakiness of doctests on Windows. Sometime they fail with:
```
error: couldn't create a temp dir: The system cannot find the path specified. (os error 3) at path "C:\\Users\\CIRCLE~1.PAC\\AppData\\Local\\Temp\\rustdoctest86bH8a\\rmetawkIVXG"
```

Probably something in CircleCI runner messes with default TEMP dir, causing rustc to fail with this error.

Tested on 15 reruns of CircleCI job, they all succeeded, so I'm pretty confident this helps, although not sure exactly why.

Pull Request resolved: facebook#371

Differential Revision: D47917932

fbshipit-source-id: 0baf1d0fd5dce9520d381e3b268716af30ec0d81
@KapJI KapJI force-pushed the export-D47917932 branch from 401b1fc to 16a238b Compare August 1, 2023 14:27
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47917932

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

2 participants