Skip to content

Commit fa10de5

Browse files
committed
CI: use a bigger timeout for bitbake builds
We now separate the timeouts for bitbake commands that just do some parsing, and those that do actual builds.
1 parent 320a8b7 commit fa10de5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

client/src/__tests__/unit-tests/driver/scanner.test.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import path from 'path'
77
import fs from 'fs'
88
import { BitBakeProjectScanner } from '../../../driver/BitBakeProjectScanner'
99
import { BitbakeDriver } from '../../../driver/BitbakeDriver'
10-
import { BITBAKE_TIMEOUT } from '../../../utils/ProcessUtils'
10+
import { BITBAKE_BUILD_TIMEOUT, BITBAKE_TIMEOUT } from '../../../utils/ProcessUtils'
1111
import { mockVscodeEvents } from '../../utils/vscodeMock'
1212
import { importRecipe, removeRecipe, integrationBitbakeFolder } from '../../utils/bitbake'
1313
import { logger } from '../../../lib/src/utils/OutputLogger'
@@ -54,7 +54,14 @@ describe('BitBakeProjectScanner', () => {
5454
}, (error) => {
5555
throw error
5656
})
57-
}, BITBAKE_TIMEOUT)
57+
// Running devtool modify needs to build uninative, quilt-native, and a few recipes
58+
// Since the age of AI, fetching anything now takes ages, so we increase the timeout
59+
// Note that such a timeout is only possible on Github self-hosted runners or local machines
60+
// Public Github runners have a max timeout of 1 hour per job
61+
// The workspace is kept for the remaining tests, so we don't need to do it again
62+
// Also, our self-hosted runner have a Yocto sstate cache, so it's only
63+
// rebuilt when changing the openembedded version
64+
}, BITBAKE_BUILD_TIMEOUT)
5865

5966
afterAll((done) => {
6067
bitBakeProjectScanner.bitbakeDriver.spawnBitbakeProcess('devtool reset busybox').then((child) => {

client/src/utils/ProcessUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ function importFromVSCode (id: string): NodeRequire {
3636
// The conversion allows the linter to understand the type of the imported module
3737
export const pty = importFromVSCode('node-pty') as unknown as typeof nodepty
3838

39-
export const BITBAKE_TIMEOUT = 600000 // 10 minutes
39+
export const BITBAKE_TIMEOUT = 300000 // 3 minutes
40+
export const BITBAKE_BUILD_TIMEOUT = 7200000 // 2 hours
4041
export const BITBAKE_EXIT_TIMEOUT = 30000
4142

4243
export type KillProcessFunction = (child: nodepty.IPty) => Promise<void>

0 commit comments

Comments
 (0)