Attempt to fix CI flakes (#1243) (#1282)

This is my latest salvo in trying to fix the persistent CI flakes we've
been having. They center on flow failing with `Out of retries,
exiting!`. Here's a representative failure [1].

My approach here is based on a discussion in a [GitHub thread] which
suggests that setting `server.max_workers=1` in the config can fix it.
Unfortunately, since it's in the flowconfig and is not a command line
option, I needed to fork the flowconfig into a CI and non-CI version.

Test plan: Merge it, and see if the flake goes away.

[1]: https://circleci.com/gh/sourcecred/sourcecred/1609?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link
[GitHub thread]: https://github.com/atlassian/react-beautiful-dnd/issues/1007
This commit is contained in:
Dandelion Mané 2019-08-13 18:22:03 +02:00 committed by GitHub
parent 607a6d426d
commit e256b73f3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,4 @@
# If modifying this file, please modify .flowconfig-ci too!
[ignore]
[include]

16
.flowconfig-ci Normal file
View File

@ -0,0 +1,16 @@
# If modifying this file, please modify .flowconfig too!
[ignore]
[include]
[libs]
flow-typed
[lints]
[options]
suppress_comment=\\(.\\|\n\\)*\\$ExpectFlowError
include_warnings=true
server.max_workers=1
[strict]

View File

@ -49,6 +49,22 @@ function makeTasks(
return ["env", "SOURCECRED_BIN=" + backendOutput, ...invocation];
}
function flowCommand(limitMemoryUsage /*: boolean */) {
const cmd = [
"yarn",
"run",
"--silent",
"flow",
"--quiet",
"--max-warnings=0",
];
// Use only one worker to try to avoid flow flakey failures
if (limitMemoryUsage) {
cmd.push("--flowconfig-name", ".flowconfig-ci");
}
return cmd;
}
const basicTasks = [
{
id: "ensure-flow-typing",
@ -74,7 +90,7 @@ function makeTasks(
},
{
id: "flow",
cmd: ["yarn", "run", "--silent", "flow", "--quiet", "--max-warnings=0"],
cmd: flowCommand(limitMemoryUsage),
deps: [],
},
{