potiuk commented on PR #46821:
URL: https://github.com/apache/airflow/pull/46821#issuecomment-2662973138

   cc: @jason810496  --> You likely did not know that :) but:
   
   * pre-commit by default runs checks in parallel when you run it on group of 
files - it will split them in chunks and run as many processes as you have 
processors (this can be disabled by require_serial)
   * also by default pre-commit will pass the list of files to pre-commit - 
those files that were locally changed in the PR and match the "files" 
specification if it is there. We **really** don't want to run this slow check 
on every PR - - so setting `files: ^airfflow/config_templates/config.yml` will 
only run the tests locally when the config.yml changes
   * in all PRs we run `--all-files` in CI just to make sure we have no false 
positives introduced by some of the non-modified files 
   * in some PRs that are very small (for example README update) we do not 
build CI image at all, because we do not need it there, in those PR we 
automatically skip all pre-commits that are at the end of .pre-commit,yml file 
after certain comment (we parse it and extract list of "CI image" bound 
pre-commits). So if we want to add pre-commit that uses ci-image, it should be 
added at the end 
   
   Pre-commit relevant docs: https://pre-commit.com/#creating-new-hooks
   Our contributing guide docs explaining all that: 
https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst
   


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