Skip to content

Conversation

@pawelangelow
Copy link
Contributor

@pawelangelow pawelangelow commented Jan 8, 2026

What

The restore-keys is the fallback mechanism. When running on a branch like feature/RI-123/something:

  • First looks for exact match: eslint-Linux-feature/RI-123/something cache
  • If not found, falls back to any cache starting with eslint-Linux- (which includes eslint-Linux-main)

So what happens if we change .eslintrc.js? - That makes ESLint ignore the cache, lint all the files, and create a new cache.

The problem comes because the GitHub action doesn't update the cache if it has the same name (the action step returns: Post job cleanup. Cache hit occurred on the primary key eslint-Linux-feature-.... not saving cache.

There's a hack to do it manually - Go to Actions -> Caches and delete the old one, then after the first run, the cache will be OK. But this is manual work, so this PR solves this problem.

Another thing

For the sake of automation, now every merge in main would trigger the linter to prepare the cache. If that PR didn't update anything ESLint-related, it will reuse the cache, and it will be a very quick one.

Added workflow_dispatch as well, in case we want to run it manually.


Note

Improves ESLint workflow reliability and automation.

  • Adds push on main and workflow_dispatch triggers to run lint automatically and on-demand
  • Updates cache key/restore-keys to include hashFiles('.eslintrc.js') and github.ref_name, ensuring cache invalidates on ESLint config changes while retaining branch-specific reuse

Written by Cursor Bugbot for commit d179096. This will update automatically on new commits. Configure here.

@pawelangelow pawelangelow self-assigned this Jan 8, 2026
@pawelangelow pawelangelow added the run-all-tests Trigger the CI to run the front-end, back-end and integration tests label Jan 8, 2026
@pawelangelow pawelangelow added run-lint and removed run-all-tests Trigger the CI to run the front-end, back-end and integration tests labels Jan 8, 2026
@pawelangelow pawelangelow merged commit c3bdbcb into main Jan 8, 2026
5 of 6 checks passed
@pawelangelow pawelangelow deleted the dev/change-eslint-caching-strategy branch January 8, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants