Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reviewstack: fix verify addons/ folder github ci
The container image was missing the gh command line, resulting in CI errors. Then found it was intemittently failing due to logging after finish, installing the watchman package suppressed the log. Test plan: Run the ci. Before, broken with: ``` Error: Unhandled error. (Error: GhNotInstalledError: Error: Command failed with ENOENT: gh api graphql -f searchQuery=repo:facebook/sapling is:pr author:@me -F numToFetch=100 --hostname github.com -f query= query YourPullRequestsQuery($searchQuery: String!, $numToFetch: Int!) { search(query: $searchQuery, type: ISSUE, first: $numToFetch) { nodes { ... on PullRequest { ``` Then found it was intemittently failing due to logging after finish with: ``` ● Cannot log after tests are done. Did you forget to wait for something async in your test? Attempted to log "Watchman: Watchman was not found in PATH. See https://facebook.github.io/watchman/docs/install.html for installation instructions". at console.error (../node_modules/@jest/console/build/BufferedConsole.js:163:10) at spawnError (node_modules/fb-watchman/index.js:173:13) at ChildProcess.<anonymous> (node_modules/fb-watchman/index.js:198:5) ``` Given watch was disabled, added the --no-watchman option as well, plus --detectOpenHandles to show where leaked handles are. ``` Jest has detected the following 3 open handles potentially keeping Jest from exiting: ● Timeout 814 | let timedOut = false; 815 | if (timeout > 0) { > 816 | const timeoutId = setTimeout(() => { | ^ 817 | result.kill('SIGTERM', {forceKillAfterTimeout: 5_000}); 818 | logger.error(`Timed out waiting for ${command} ${args[0]} to finish`); 819 | timedOut = true; at src/Repository.ts:816:23 at src/Repository.ts:14:71 at Object.<anonymous>.__awaiter (src/Repository.ts:10:12) at runCommand (src/Repository.ts:634:12) at Repository.runCommand (src/Repository.ts:777:12) at Repository.<anonymous> (src/Repository.ts:538:31) at src/Repository.ts:14:71 at Object.<anonymous>.__awaiter (src/Repository.ts:10:12) at src/Repository.ts:533:59 at startAsyncCall (src/utils.ts:47:27) at Repository.fetchUncommittedChanges (src/utils.ts:69:14) at WatchForChanges.changeCallback (src/Repository.ts:202:14) at WatchForChanges.poll (src/WatchForChanges.ts:92:12) at new WatchForChanges (src/WatchForChanges.ts:48:10) at new Repository (src/Repository.ts:194:28) at Object.<anonymous> (src/__tests__/analytics.test.ts:64:18) ● Timeout 814 | let timedOut = false; 815 | if (timeout > 0) { > 816 | const timeoutId = setTimeout(() => { | ^ 817 | result.kill('SIGTERM', {forceKillAfterTimeout: 5_000}); 818 | logger.error(`Timed out waiting for ${command} ${args[0]} to finish`); 819 | timedOut = true; at src/Repository.ts:816:23 at src/Repository.ts:14:71 at Object.<anonymous>.__awaiter (src/Repository.ts:10:12) at runCommand (src/Repository.ts:634:12) at Repository.runCommand (src/Repository.ts:777:12) at Repository.<anonymous> (src/Repository.ts:610:31) at src/Repository.ts:14:71 at Object.<anonymous>.__awaiter (src/Repository.ts:10:12) at src/Repository.ts:601:56 at startAsyncCall (src/utils.ts:47:27) at Repository.fetchSmartlogCommits (src/utils.ts:69:14) at WatchForChanges.changeCallback (src/Repository.ts:203:14) at WatchForChanges.poll (src/WatchForChanges.ts:92:12) at new WatchForChanges (src/WatchForChanges.ts:48:10) at new Repository (src/Repository.ts:194:28) at Object.<anonymous> (src/__tests__/analytics.test.ts:64:18) ● Timeout 72 | } 73 | > 74 | timeout = setTimeout(callback, wait); | ^ 75 | } 76 | 77 | debouncer.reset = function () { at GitHubCodeReviewProvider.debouncer [as triggerDiffSummariesFetch] (../shared/debounce.ts:74:15) at WatchForChanges.changeCallback (src/Repository.ts:206:34) at WatchForChanges.poll (src/WatchForChanges.ts:92:12) at new WatchForChanges (src/WatchForChanges.ts:48:10) at new Repository (src/Repository.ts:194:28) at Object.<anonymous> (src/__tests__/analytics.test.ts:64:18) ``` After, works locally, but intermittent problem on CI, shown to be in the timeout handling.
- Loading branch information