rusackas opened a new pull request, #45610:
URL: https://github.com/apache/superset/pull/45610
### SUMMARY
The pre-commit job installs superset-frontend's dependencies (`npm ci`,
about 30 s on a warm npm cache) and the docs' (`yarn install --immutable`,
about 60 s) on every run, then hands prek the changed files, and prek only runs
the hooks whose filters match. For a backend-only PR none of the node hooks
fire, so those installs are 90 seconds of nothing. On one slow-runner evening
the job spent 9 minutes installing for 1 second of hooks.
This moves the "Determine changed files" step up and adds a small step after
it that decides which installs are needed: frontend deps when something under
`superset-frontend/` or `superset-websocket/` changed, docs deps when a
`docs/**/*.{js,jsx,ts,tsx}` file changed (that's `oxlint-docs`'s filter), and
both whenever the mode is `all` (schedules, or no resolvable diff base). `Setup
Node.js` and the two install steps carry the matching `if`. Nothing changes
about which hooks run.
This PR touches only the workflow file, so its own run is the demonstration:
both installs should show as skipped.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A
### TESTING INSTRUCTIONS
On this PR's pre-commit job, "Install Frontend Dependencies" and "Install
Docs Dependencies" are skipped. On a PR that touches `superset-frontend/`, they
run as before.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in
[SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]