Skip to content

[pull] master from mozilla:master#286

Merged
pull[bot] merged 13 commits intocode:masterfrom
mozilla:master
Mar 25, 2026
Merged

[pull] master from mozilla:master#286
pull[bot] merged 13 commits intocode:masterfrom
mozilla:master

Conversation

@pull
Copy link

@pull pull bot commented Mar 25, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

timvandermeij and others added 13 commits March 22, 2026 19:40
The `setup-node` action contains built-in support for caching [1], so
this commit makes sure we use it for all Node.js-based workflows to
reduce workflow execution time.

Note that, contrary what one might expect [2], the `node_modules`
directory is deliberately not cached because it can conflict with
differing Node.js versions and because it's not useful in combination
with `npm ci` usage which wipes the `node_modules` folder
unconditionally. Therefore, the action instead caches the global `npm`
cache directory instead which does not suffer from these problems and
still provides a speed-up at installation time.

[1] https://github.com/actions/setup-node?tab=readme-ov-file#caching-global-packages-data
[2] actions/setup-node#416
[3] actions/cache#67
For the Python-based workflows we were already using `pip` caching [1],
but sadly this isn't fully functional at the moment because the caching
functionality uses `requirements.txt` to determine when to create or
invalidate the cache. However, we have two different `pip` install
commands but only a `requirements.txt` for one of them (the Fluent
linter), which means that the other job (the font tests) will not
populate the cache with its dependencies.

This can be seen by opening any font tests or Fluent linting build and
noticing that they report the exact same cache key even though their
dependencies are different. In the installation step the dependencies
are reported as "Downloading [package].whl" instead of the expected
"Using cached [package].whl".

This commit fixes the issue by explicitly defining a `requirements.txt`
file for both jobs and pointing the caching functionality to the
specific file paths to make sure that unique caches with the correct
package data are used. While we're here we also align the syntax and
step titles in the files for consistency.

[1] https://github.com/actions/setup-python?tab=readme-ov-file#caching-packages-dependencies
This has been deprecated in ten releases, so let's just remove it now.
Using the Fetch API simplifies and shortens the `downloadFile` function considerably, since among other things it handles redirects[1] by default.

Also, the regular expression in `downloadManifestFiles` can be replaced with a simple string function now.

---

[1] Implementations of the Fetch API should already prevent e.g. redirect loops and limit the total number of redirects allowed.
Download test PDFs with the Fetch API
Implement Node.js caching, and fix Python caching, in the GitHub Actions workflows
Copy webpack.mjs to legacy in dist task
Remove the deprecated `PDFWorker.fromPort` method (PR 19943 follow-up)
Remove the selection after the pages have been extracted (bug 2025247)
Strip private ancillary PNG chunks before comparing images in ref tests
@pull pull bot locked and limited conversation to collaborators Mar 25, 2026
@pull pull bot added the ⤵️ pull label Mar 25, 2026
@pull pull bot merged commit ae70a5d into code:master Mar 25, 2026
@pull pull bot had a problem deploying to code-coverage March 25, 2026 02:03 Failure
@pull pull bot had a problem deploying to code-coverage March 25, 2026 02:03 Failure
@pull pull bot had a problem deploying to code-coverage March 25, 2026 02:03 Failure
@pull pull bot had a problem deploying to code-coverage March 25, 2026 02:03 Failure
@pull pull bot had a problem deploying to code-coverage March 25, 2026 02:03 Failure
@pull pull bot had a problem deploying to code-coverage March 25, 2026 02:03 Failure
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants