mirror of
https://github.com/stablyai/orca.git
synced 2026-10-30 16:47:34 +00:00
Prepare server template assembly alongside qualification (#31422)
* Prepare template assembly during qualification and cache Intel downloads * Limit early template qualification polling to fifteen seconds * Verify Windows retains its download cache policy * Drop Intel store restoration after measuring its overhead
This commit is contained in:
@@ -563,12 +563,11 @@ jobs:
|
||||
|
||||
# Design D2: the desktop ships every target's addons, merged from the lanes that qualified them.
|
||||
desktop_template:
|
||||
needs: [persistence, mobile_web_bundle, linux_glibc_floor, linux_glibc217_compat, linux_musl]
|
||||
if: >-
|
||||
${{ !cancelled() && inputs.build_template &&
|
||||
needs.persistence.result == 'success' && needs.mobile_web_bundle.result == 'success' &&
|
||||
needs.linux_glibc_floor.result == 'success' &&
|
||||
needs.linux_glibc217_compat.result == 'success' && needs.linux_musl.result == 'success' }}
|
||||
needs: changes
|
||||
if: ${{ !cancelled() && inputs.build_template }}
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
runs-on: ${{ inputs.fast_runners && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }}
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
@@ -577,6 +576,45 @@ jobs:
|
||||
ref: ${{ inputs.ref }}
|
||||
persist-credentials: false
|
||||
- uses: ./.github/actions/install-node-dependencies
|
||||
- name: Wait for every template qualification lane
|
||||
uses: actions/github-script@v8
|
||||
with:
|
||||
script: |
|
||||
const deadline = Date.now() + 25 * 60_000
|
||||
const expected = {
|
||||
persistence: 6,
|
||||
mobile_web_bundle: 1,
|
||||
linux_glibc_floor: 2,
|
||||
linux_glibc217_compat: 1,
|
||||
linux_musl: 2
|
||||
}
|
||||
while (Date.now() < deadline) {
|
||||
const jobs = await github.paginate(github.rest.actions.listJobsForWorkflowRun, {
|
||||
...context.repo, run_id: context.runId, filter: 'latest', per_page: 100
|
||||
})
|
||||
const assemblers = jobs.filter(job =>
|
||||
job.name === 'desktop_template' || job.name.endsWith(' / desktop_template'))
|
||||
if (assemblers.length > 1) throw new Error('Ambiguous desktop template qualification')
|
||||
if (assemblers.length === 1) {
|
||||
const prefix = assemblers[0].name.slice(0, -'desktop_template'.length)
|
||||
let ready = true
|
||||
for (const [name, count] of Object.entries(expected)) {
|
||||
const lanes = jobs.filter(job => job.name === `${prefix}${name}` ||
|
||||
job.name.startsWith(`${prefix}${name} (`))
|
||||
if (lanes.length > count) throw new Error(`Unexpected qualification lanes: ${name}`)
|
||||
for (const lane of lanes) {
|
||||
if (lane.status === 'completed' && lane.conclusion !== 'success') {
|
||||
throw new Error(`Template qualification did not succeed: ${lane.name} (${lane.conclusion})`)
|
||||
}
|
||||
}
|
||||
if (lanes.length !== count || lanes.some(lane => lane.status !== 'completed')) ready = false
|
||||
}
|
||||
if (ready) return
|
||||
}
|
||||
await new Promise(resolve => setTimeout(resolve, 15_000))
|
||||
}
|
||||
throw new Error('Timed out waiting for every template qualification lane')
|
||||
|
||||
- name: Collect every lane's slot
|
||||
uses: actions/download-artifact@v8
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user