From b892aad548c1feeba3452a378dbc638231236d27 Mon Sep 17 00:00:00 2001 From: melanie witt Date: Tue, 12 May 2020 21:47:09 +0000 Subject: [PATCH] Run sphinx-build in parallel for releasenotes Since the recent releases and upper-constraints bumps for openstackdocstheme 2.1.0 and reno 3.1.0, both sphinx extensions now support safe parallel reading. This adds the '-j auto' option to the sphinx-build command for building release notes to parallelize the build over multiple CPUs. This effort was inspired by the nova build-openstack-releasenotes job which typically takes 52m to 1h to run. The job timeout is 1h, so we are occasionally seeing TIMED_OUT job failures. With parallel sphinx-build, the job run time is reduced down to 15m. Change-Id: If3c615119b1a72ce294e22685ddc2dcd6b63f4a0 --- roles/build-releasenotes/tasks/main.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/build-releasenotes/tasks/main.yaml b/roles/build-releasenotes/tasks/main.yaml index d6ca1b3a3..aba772399 100644 --- a/roles/build-releasenotes/tasks/main.yaml +++ b/roles/build-releasenotes/tasks/main.yaml @@ -50,7 +50,7 @@ trap "rm -f -- '$REFERENCES'" EXIT # Extract translations - sphinx-build -b gettext \ + sphinx-build -j auto -b gettext \ -d ${DIRECTORY}/build/doctrees.gettext \ ${DIRECTORY}/source/ \ ${DIRECTORY}/source/locale/ @@ -92,7 +92,7 @@ done # Build translated document - sphinx-build -b html -D language=${language} \ + sphinx-build -j auto -b html -D language=${language} \ -d "${DIRECTORY}/build/doctrees.${language}" \ ${DIRECTORY}/source/ ${DIRECTORY}/build/html/${language} @@ -126,6 +126,6 @@ executable: /bin/bash chdir: '{{ zuul_work_dir }}' cmd: | - {{ zuul_work_virtualenv }}/bin/sphinx-build -a -E -W \ + {{ zuul_work_virtualenv }}/bin/sphinx-build -a -E -W -j auto \ -d releasenotes/build/doctrees \ -b html releasenotes/source releasenotes/build/html