FrankYang0529 opened a new pull request, #76111:
URL: https://github.com/apache/airflow/pull/76111

   ### Why
   
   - Six CI jobs install prek only to run one to three hooks. When the prek 
cache misses, each of these jobs builds all 56 hook environments, downloads Go 
and Node, and clones 11 hook repositories. The job then uses one of those 
environments.
   - On 2026-10-28, 425 of the 943 Install prek steps in these jobs on public 
runners missed the cache. The median miss spent 58.1 s in `prek install-hooks`. 
In the logs of those misses, the Node environment that the provider builds need 
was ready 7.4s after `prek install-hooks` started. The Python environment that 
the MyPy providers and Migration round-trip jobs need was ready 2.6s after that 
command started.
   
   ### How
   
   - `install-prek` gets an optional `hooks` input. When `hooks` is set, the 
action still restores the cache. If cache miss, `prek install-hooks` prepares 
only the listed hooks. The action also never saves the cache in that case, 
because the archive would hold only those environments under the key of the 
full archive.
   
   ### Local Result
   
   The `install-prek` action runs when `hooks` is not set, built 58 
environments in 65.1s. `prek install-hooks compile-fab-assets 
compile-edge-assets compile-common-ai-provider-assets` built one Node 
environment in 14.3s. `prek install-hooks mypy-providers` and `prek 
install-hooks migration-round-trip` each built one Python environment in 3.3s 
and 3.0s. With a complete cache already in `PREK_HOME`, each of the four 
commands finished in about 0.1 s or less.
   
   * related: #75205
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [X] Yes - Claude Code
   
   <!--
   Generated-by: [Tool Name] following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   -->
   
   


-- 
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]

Reply via email to