Problem/Motivation

Since #3470837: Decide on the future of the user guide moved the guide to Markdown and Zensical, GitLab CI builds the guide and publishes it to GitLab Pages. The assembled site for all 14 locales is currently about 234MB, which is larger than the GitLab Pages size limit on git.drupalcode.org. So GitLab rejects the deployment in the pages:deploy step with an error like this:

pages:deploy - artifacts for pages are too large: 168248402

The build and deploy jobs both pass, but the pipeline fails because of the artifact size limit, and nothing is published.

As a work around, we currently only publishe a subset of languages. Currently set to EN, and DE.

Where the size comes from:

  • Each locale is roughly 13–20 MB, and screenshots account for about half of that. Every locale has its own translated screenshots, so they can't be shared between locales.
  • The limit appears to be checked against the unpacked size, not the zipped artifact. A 168 MB deployment, built with screenshots converted to lossless WebP, was still rejected.
  • An en + de build (about 35 MB) deploys without problems, so the limit is somewhere between 35 MB and 168 MB. It's probably GitLab's default of 100 MB.

Merge request previews have the same problem. They currently build only en and de, plus up to three other locales the merge request changes.

Steps to reproduce

  1. Run a pipeline on 11.x that builds every locale.
  2. The build documentation and publish documentation jobs pass.
  3. The pipeline fails at pages:deploy with "artifacts for pages are too large", and the site isn't updated.

Proposed resolution

  1. Ideally we can raise the GitLab Pages maximum size for the user_guide project to 500 MB. That's about twice the current full site, which leaves room for new locales and new screenshots. I don't know which version of GitLab druapl.org uses, but it looks like Oo Premium and Ultimate instances, a GitLab administrator can raise the limit for a single project (see https://docs.gitlab.com/administration/pages/#set-maximum-size-of-gitlab-pages-site-in-a-project). Otherwise it's the instance-wide setting, which defaults to 100 MB.
  2. Once the limit is raised, publish every locale again, and raise or remove the cap on preview locales.

Smaller sites alone won't solve this. I did some testing to reduce the image size by converting them all to Lossless WebP. But that only brings the full site down to about 165 MB. So while there are things we can do to optimze images, that along isn't going to get us insde the 100MB limit.

Remaining tasks

  • [ ] After the limit is raised, publish every locale and revisit the preview locale cap

Comments

eojthebrave created an issue.

  • eojthebrave committed a1f3d1c8 on 11.x
    [#3629091] Publish only a subset of locales to GitLab Pages as hopefully...