mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
fix(web-app-docs): skip the language assertion when docs only rides along
call-test-deploy appends web-app-docs to every matrix row that carries
instructions, purely as the guide host that replays the host app's README.
test-e2e-playwright then runs the passenger's whole spec suite, and the
language assertion in it waits out two full Sphinx builds: 7086s measured in
run 39137606155, 35 percent of that job's wall-clock budget, spent proving the
docs i18n publish path inside a Moodle job. Moodle and Discourse were both
killed by the budget governor because of it.
DOCS_I18N_ASSERT_LANGUAGES is false exactly when guide_host names this role,
and the assertion is skipped then. Coverage is deduplicated rather than lost:
docs' own matrix rows still run it, and they fit the budget at 8907s. The
cheap negative control, that a language without a translated site answers 404,
stays unconditional.
The flag defaults to asserting, so a render that never sets it behaves as it
does today instead of failing the spec file at module load.
Unproven until CI sees it: that lookup('env', 'guide_host') reaches Ansible
inside the deploy container. If it does not, the flag renders true everywhere
and nothing changes. Check the rendered .env of a passenger row for
DOCS_I18N_ASSERT_LANGUAGES=false.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d3d5090e0f
commit
e17d182d0a
2 files changed
+6
-1
No files matched your search
@@ -7,7 +7,9 @@ const preload = decodeDotenvJsonList(
|
||||
"DOCS_I18N_PRELOAD_LANGUAGES_JSON",
|
||||
);
|
||||
const samples = JSON.parse(decodeDotenvQuotedValue(process.env.DOCS_I18N_SAMPLES_JSON || "") || "{}");
|
||||
const translated = preload.filter((code) => code in samples);
|
||||
const assertLanguages =
|
||||
decodeDotenvQuotedValue(process.env.DOCS_I18N_ASSERT_LANGUAGES || "true") !== "false";
|
||||
const translated = assertLanguages ? preload.filter((code) => code in samples) : [];
|
||||
|
||||
const VERSION_BUILD = 5_300_000;
|
||||
const VERSION_THEN_TRANSLATION = 2 * VERSION_BUILD;
|
||||
|
||||
@@ -12,6 +12,9 @@ DESIGN_SERVICE_ENABLED={{ lookup('config', application_id, 'services.design.enab
|
||||
|
||||
DESIGN_TITLE={{ (lookup('design', application_id).title if lookup('design', application_id).title is string else '') | dotenv_quote }}
|
||||
|
||||
# Exception: on a guide-host row the language assertion waits out two full Sphinx builds (7086s measured) and SIGKILLs the host app's wall-clock budget.
|
||||
DOCS_I18N_ASSERT_LANGUAGES={{ (lookup('env', 'guide_host') | trim != application_id) | string | lower }}
|
||||
|
||||
{% set docs_samples = {} %}
|
||||
{% for docs_code in DOCS_I18N_PRELOAD_LANGUAGES if docs_code != HOST_LL %}
|
||||
{% set _ = docs_samples.update({docs_code: lookup('i18n_sample', 'docs', docs_code, 'README.md', 5)}) %}
|
||||
|
||||
Reference in new issue
Block a user