Closed Bug 1380956 Opened 7 years ago Closed 7 years ago

Cache the ESLint node modules tar on the docker images and improve ESLint's installations of files

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

3 Branch
enhancement
Not set
normal

Tracking

(firefox56 fixed)

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(5 files)

Similar to what we did in bug 1379119, we should cache the ESLint node_modules tar onto the docker images, rather than downloading it each time.

I also have a couple of cleanups for package.json files that I want to do, so I'll put those in here as well.
So this turned into a general tidy up patch set. I've done a few extra things, including requiring a minimum npm version (currently based on the version installed with node 6.9.1), reducing the amount of work we do on setup, and simplifying the package.json files.
Summary: Cache the ESLint node modules tar on the docker images rather than downloading it each time → Cache the ESLint node modules tar on the docker images and improve ESLint's installations of files
Comment on attachment 8886562 [details]
Bug 1380956 - Build the node_modules directory for ESLint on the docker image for the worker, rather than downloading it each time.

https://reviewboard.mozilla.org/r/157370/#review162852

Thanks for handling this!

::: commit-message-67cd1:1
(Diff revision 1)
> +Bug 1380956 - Cache the ESLint node_modules directory on the builders rather than downloading it each time. r?ahal

This isn't all that important and people will understand what you mean, but 'builder' is a buildbot-ism that doesn't really have any meaning in taskcluster.

The in-tree definition is usually referred to as a `task` and the machine that runs the task is usually referred to as a `worker`.

In this case though, it's more accurate to say the node_modules are being built into the docker image (that the worker will be loading).

::: tools/lint/eslint/update.sh:1
(Diff revision 1)
> +#!/bin/sh
> +# Script to regenerate the npm packages used for ESLint by the builders.
> +# Requires

This should be a mv rather than delete/add
Attachment #8886562 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8886563 [details]
Bug 1380956 - Add a minimum version requirement for npm in ESLint setup and improve the version handling.

https://reviewboard.mozilla.org/r/157372/#review162854
Attachment #8886563 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8886564 [details]
Bug 1380956 - Don't manually install our local eslint plugins as npm will do that for us.

https://reviewboard.mozilla.org/r/157374/#review162856

Nice optimization!
Attachment #8886564 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8886565 [details]
Bug 1380956 - Use exact matches of versions in eslint-plugin-mozilla for better tracking.

https://reviewboard.mozilla.org/r/157376/#review162858
Attachment #8886565 - Flags: review?(ahalberstadt) → review+
Comment on attachment 8886566 [details]
Bug 1380956 - List only the directly required dependencies for ESLint in the top-level package.json.

https://reviewboard.mozilla.org/r/157378/#review162860
Attachment #8886566 - Flags: review?(ahalberstadt) → review+
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/71526d1e9db8
Build the node_modules directory for ESLint on the docker image for the worker, rather than downloading it each time. r=ahal
https://hg.mozilla.org/integration/autoland/rev/576eaf084c0b
Add a minimum version requirement for npm in ESLint setup and improve the version handling. r=ahal
https://hg.mozilla.org/integration/autoland/rev/74d387e1e050
Don't manually install our local eslint plugins as npm will do that for us. r=ahal
https://hg.mozilla.org/integration/autoland/rev/23a1032b57c9
Use exact matches of versions in eslint-plugin-mozilla for better tracking. r=ahal
https://hg.mozilla.org/integration/autoland/rev/962c95ec8881
List only the directly required dependencies for ESLint in the top-level package.json. r=ahal
Product: Testing → Firefox Build System
Version: Version 3 → 3 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.