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

   The pre-commit is a fantastic tool, and we heavily used it for years, but 
generally the tool stagnated and is not showing a sign of adapting to our 
needs. For years we tried to convince pre-commit maintainers that things like 
autocomplete are necessary - but it met with pretty much resistance (if not 
hostility) from the maintainer. Also there was no chance for them to accept 
expectations of bigger projects like ours, where we have a huge monorepo and 
not only multiple needs but also different parts of the repo needing different 
language support (golang, typescript soon) - and apparenty the maintainer of 
pre-commit does not think monorepo is a good thing at all. Similarly - they did 
not recognize the raise of `uv` and the only way to use `uv` with pre-commit is 
to patch it by installing `pre-comit-uv` that essentialy patches pre-commit 
with uv support. This is not really sustainable and the tool lags behind many 
of our needs.
   
   Luckily - we have new project in town - prek - which rewrites pre-commit 
that is 100% compatible (now), 10x faster (because rust), uses `uv` natively, 
supports auto-complete already and they have very friendly maintainer who is 
not only supporting us but also very happily works on improving `prek` to close 
all the gaps, and plans to implement (with our support of course and 
cooperation) monorepo support - that will allow us to modularise our 
pre-commits.
   
   This PR switches our pre-commit support to use prek exclusively:
   
   * breeze static checks command is completely removed
   * custom auto-complete code in breeze as well
   * instructions are updated to setup prek instead of precommit
   * CI is updated to run prek instead of pre-commmit
   * documentation for static checks is reviewed and new features that prek 
enables are added
   
   (cherry picked from commit 3442d811cf693e836a862652c9caf04b7a373af7)
   
   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of an existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request 
Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)**
 for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals))
 is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party 
License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in a 
newsfragment file, named `{pr_number}.significant.rst` or 
`{issue_number}.significant.rst`, in 
[airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


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