mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
perf(prepull): pull the Playwright image in the background on hosts that run E2E
The E2E stage pulled mcr.microsoft.com/playwright synchronously right before the tests, 11-19 min on every reinstall and on every fresh CI runner, because the background pre-pull only knew the app images. The constructor now hands the runner image to the pre-pull when RUNTIME runs E2E and the host has a server stage, the only stage that runs test-e2e-playwright; a backup-only host would otherwise install Docker for an image it never uses. Measured on a compose reinstall: the pull before the tests drops from 18m49s to 1.6s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0ece4fcbc4
commit
ef20262813
2 files changed
+10
-4
No files matched your search
@@ -1,4 +1,7 @@
|
||||
---
|
||||
# REQUIRED:
|
||||
# sys_svc_container_prepull_extra # image references to pull besides the app images of the deploy, e.g. the E2E runner
|
||||
|
||||
- name: "📥 Pre-pull the images of this deploy in the background"
|
||||
when:
|
||||
- not (STORAGE_CONSTRAINED | bool)
|
||||
@@ -8,10 +11,9 @@
|
||||
- name: "🧮 Derive the images the deploy of the host runs"
|
||||
ansible.builtin.set_fact:
|
||||
sys_svc_container_prepull_plan: >-
|
||||
{{
|
||||
lookup('applications')
|
||||
| update_pull_images(lookup('application_closure', group_names | intersect(lookup('deployment').running)))
|
||||
}}
|
||||
{%- set plan = lookup('applications')
|
||||
| update_pull_images(lookup('application_closure', group_names | intersect(lookup('deployment').running))) -%}
|
||||
{{ plan | combine({'pull': plan.pull + (sys_svc_container_prepull_extra | reject('in', plan.pull) | list)}) }}
|
||||
|
||||
- name: "📥 Pull the images the host does not hold yet"
|
||||
ansible.builtin.include_tasks: "{{ role_path }}/tasks/utils/prepull/pull.yml"
|
||||
|
||||
@@ -224,6 +224,10 @@
|
||||
ansible.builtin.include_role:
|
||||
name: sys-svc-container
|
||||
tasks_from: utils/prepull/start.yml
|
||||
vars:
|
||||
sys_svc_container_prepull_extra: >-
|
||||
{{ [lookup('config', 'test-e2e-playwright', 'services.playwright.image') ~ ':' ~ lookup('config', 'test-e2e-playwright', 'services.playwright.version')]
|
||||
if RUNTIME in ['dev', 'act', 'github'] and 'server' in (group_names | get_deployment_types_from_groups) else [] }}
|
||||
|
||||
- name: 🛠️ Preload shared services
|
||||
ansible.builtin.include_role:
|
||||
|
||||
Reference in new issue
Block a user