Problem/Motivation

See #3462763: Use artifacts to share the phpstan result and cspell caches from core to MRs for background. We should be able to do exactly the same for eslint and stylelint.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3463108

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

catch created an issue. See original summary.

catch’s picture

catch’s picture

Status: Active » Needs review

eslint doesn't appear to have a verbose option, so it's hard to show this definitely working, but
https://git.drupalcode.org/project/drupal/-/jobs/2258295 is a job from a sandbox MR, where the cspell and phpstan jobs both had cache hits, and eslint running with the same logic. eslint job completed in 51 seconds.

https://git.drupalcode.org/project/drupal/-/jobs/2257804 is a job with the current logic and the eslint job took 1m45s.

You can also see that the cache warming job generates the .eslintcache and .stylelintcache files correctly: https://git.drupalcode.org/project/drupal/-/jobs/2259079

I also tested the same command locally and the caching worked there.

catch’s picture

Title: Use artifacts to share the eslint cache from core to MRs » Use artifacts to share the eslint and styleint caches from core to MRs

We should do eslint and stylelint in a single PR since their cache strategies are the same.

https://git.drupalcode.org/project/drupal/-/jobs/2259023 this shows stylelint caching working in my sandbox branch/MR with the cache target pointing to itself.

catch’s picture

Title: Use artifacts to share the eslint and styleint caches from core to MRs » [PP-1] Use artifacts to share the eslint and styleint caches from core to MRs
catch’s picture

Issue summary: View changes
catch’s picture

Title: [PP-1] Use artifacts to share the eslint and styleint caches from core to MRs » Use artifacts to share the eslint and styleint caches from core to MRs
Issue tags: +Test suite performance
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

per the slack conversation @catch shared this https://git.drupalcode.org/project/drupal/-/merge_requests/8952/diffs which believe shows this working. Going to mark.

nod_’s picture

Status: Reviewed & tested by the community » Needs work

question in MR

catch’s picture

Status: Needs work » Reviewed & tested by the community

Good spot on the MR, since it's a trivial change, moving back to RTBC.

  • nod_ committed 1161b8d4 on 11.0.x
    Issue #3463108 by catch, smustgrave: Use artifacts to share the eslint...

  • nod_ committed 5374786d on 11.x
    Issue #3463108 by catch, smustgrave: Use artifacts to share the eslint...

nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 5374786 and pushed to 11.x. Thanks!
Committed 1161b8d and pushed to 11.0.x. Thanks!

nod_’s picture

Version: 10.3.x-dev » 11.0.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.