Speaking of which: https://github.com/apache/airflow/pull/54917 -> changing
all our prek scripts to PEP-723 inline dependencies (and min prek version
set to 0.1.3)

J.


On Fri, Aug 22, 2025 at 12:37 PM Jarek Potiuk <ja...@potiuk.com> wrote:

> Yeah. There are a few UX issues I pointed at and Jo is working on them.
>
> BTW. We also have other improvements coming that might soon make us start
> departing from `pre-commit` - even earlier than with monorepo support.
>
> Namely: https://github.com/j178/prek/issues/509 that will allow us to
> move most of the dependencies for Python hooks to be inline PEP 723
> compliant dependencies without duplicating them with .pre-commit-config.yaml
> This one is actually very cool, because it will allow for much easier
> testing and development of prek hooks
>
> uv run ./scripts/ci/prek/hoook_name.py files ....
>
> Also there is a discussion in pip to implement PEP-723 - finally -
> https://github.com/pypa/pip/issues/12891 - and then you will be able to
> also run such scripts with just *pep* without having to have an explicit
> venv - which IMHO is a game-changer for Python scripts.
>
> I will also try to figure out a way how we can make pre-commit fail with
> our configuration, ideally with some message that will guide people to stop
> using it. I have some ideas, but I am not sure how far it will go.
>
> J.
>
>
> On Fri, Aug 22, 2025 at 7:28 AM Amogh Desai <amoghde...@apache.org> wrote:
>
>> The monorepo support will be a game changer in terms of repo organisation!
>>
>> Looking forward to the initial PR getting merged so that we can expand it
>> across various distributions in our repo and keep the prek hooks minimal
>> and focused per distribution!
>>
>> Thanks & Regards,
>> Amogh Desai
>>
>>
>> On Wed, Aug 20, 2025 at 5:33 PM Jarek Potiuk <ja...@potiuk.com> wrote:
>>
>> > With https://github.com/apache/airflow/pull/54726 that I just merged
>> which
>> > uses  prek 0.1.1 released not even an hour ago, we are now getting a
>> (more
>> > than) full parity with pre-commit (the auto-update feature was the only
>> one
>> > missing for our CI) .
>> >
>> > I bumped the minimum version of prek to `0.1.1` in the config file, so
>> you
>> > will have to run `uv tool upgrade prek` or similar to get the latest
>> > version.
>> >
>> > I believe that kind-of-ends the initial teething period of
>> > "switching from pre-commit to prek". I don't foresee we'll have to bump
>> the
>> > minimum version of `prek` that frequently.
>> >
>> > The next milestone (barring some potential bug fixes) and minimum
>> version
>> > bump I expect is when we get monorepo support and split our
>> > .pre-commit-config.yaml into a number of smaller ones. This looks very
>> > promising with https://github.com/apache/airflow/pull/54615 - and feel
>> > free
>> > to test it and provide any feedback in
>> > https://github.com/j178/prek/pull/481
>> >
>> > J.
>> >
>> > On Mon, Aug 18, 2025 at 5:57 PM Buğra Öztürk <ozturkbugr...@gmail.com>
>> > wrote:
>> >
>> > > Amazing news! I switched just after merge and even used it in a PR.
>> > > Everything looks smooth. Thanks Jarek and all!
>> > >
>> > > Bugra Ozturk
>> > >
>> > > On Mon, 18 Aug 2025, 17:45 Jarek Potiuk, <ja...@potiuk.com> wrote:
>> > >
>> > > > 0.0.29 is merged so you will have to update (but you will get the
>> > > warning).
>> > > > BTW - if someone tried the `URL` install to install prek, the way to
>> > get
>> > > > back to released versions is
>> > > >
>> > > > uv tool install --force --upgrade prek
>> > > >
>> > > > (Just hit this one) .
>> > > > J.
>> > > >
>> > > >
>> > > > On Mon, Aug 18, 2025 at 4:09 PM Jarek Potiuk <ja...@potiuk.com>
>> wrote:
>> > > >
>> > > > > And... (apart from addressing a few teething issues and quickly
>> > bumping
>> > > > > versions of prek to 0.0.28 and soon 0.0.29) :):
>> > > > >
>> > > > > Jo has already pushed a PR with the preliminary monorepo /
>> workspace
>> > > > > support. I created a very draft PR on how separating go-sdk
>> > > > > .pre-commit-config.yaml could look like:
>> > > > > * https://github.com/apache/airflow/pull/54615 -> separating
>> golang
>> > > > > .pre-commit-config.yaml
>> > > > > * The PR in prek that implements it -> already with my first
>> comments
>> > > > > where  tried it:
>> > > > > https://github.com/j178/prek/pull/481#issuecomment-3196986281
>> > > > >
>> > > > > You can try it yourself also and provide comments:
>> > > > >
>> > > > > 1. Install the in-progress version of prek with workspaces
>> > > > >
>> > > > > uv tool install "prek @ git+
>> > https://github.com/j178/prek.git@workspace
>> > > "
>> > > > >
>> > > > > 2. Checkout my PR in airflow repo:
>> > > > >
>> > > > > gh co 54615
>> > > > >
>> > > > > 3. Play
>> > > > >
>> > > > > J.
>> > > > >
>> > > > >
>> > > > > On Mon, Aug 18, 2025 at 3:07 PM Kaxil Naik <kaxiln...@gmail.com>
>> > > wrote:
>> > > > >
>> > > > >> I switched too, thank you guys
>> > > > >>
>> > > > >> On Mon, 18 Aug 2025 at 07:18, Amogh Desai <amoghde...@apache.org
>> >
>> > > > wrote:
>> > > > >>
>> > > > >> > Just made the switch!
>> > > > >> >
>> > > > >> > Thank you, Jo, Jarek and Ash!
>> > > > >> >
>> > > > >> > Thanks & Regards,
>> > > > >> > Amogh Desai
>> > > > >> >
>> > > > >> >
>> > > > >> > On Sun, Aug 17, 2025 at 5:36 PM Zhe-You Liu <
>> zhu424....@gmail.com
>> > >
>> > > > >> wrote:
>> > > > >> >
>> > > > >> > > I just switched to `prek`, and it runs smoothly and quickly.
>> > > > >> > > Thank you, Jarek, Jo, and Ash!
>> > > > >> > >
>> > > > >> > > Best regards,
>> > > > >> > > Jason
>> > > > >> > >
>> > > > >> > > On Sun, Aug 17, 2025 at 6:59 PM Pavankumar Gopidesu <
>> > > > >> > > gopidesupa...@gmail.com>
>> > > > >> > > wrote:
>> > > > >> > >
>> > > > >> > > > Woohoo great work Jarek thank you :)
>> > > > >> > > >
>> > > > >> > > > Thank you Jo and ash.
>> > > > >> > > >
>> > > > >> > > > Pavan
>> > > > >> > > >
>> > > > >> > > > On Sun, Aug 17, 2025 at 9:27 AM Aritra Basu <
>> > > > >> aritrabasu1...@gmail.com>
>> > > > >> > > > wrote:
>> > > > >> > > >
>> > > > >> > > > > This is a good change, looking forward to seeing it
>> adopted
>> > > more
>> > > > >> > > > > --
>> > > > >> > > > > Regards,
>> > > > >> > > > > Aritra Basu
>> > > > >> > > > >
>> > > > >> > > > > On Sun, 17 Aug 2025, 12:36 pm Jarek Potiuk, <
>> > ja...@potiuk.com
>> > > >
>> > > > >> > wrote:
>> > > > >> > > > >
>> > > > >> > > > > > Hello everyone,
>> > > > >> > > > > >
>> > > > >> > > > > > *TL;DR: Please switch from pre-commit to prek for your
>> > local
>> > > > >> > > > development,
>> > > > >> > > > > > please, at your earliest convenience.*
>> > > > >> > > > > >
>> > > > >> > > > > > Following the discussion in
>> > > > >> > > > > >
>> > > > >> https://lists.apache.org/thread/mb73g4rz56n5l0gjyzm9jzolnkkc6o5c
>> I
>> > > > >> > > > just
>> > > > >> > > > > > merged https://github.com/apache/airflow/pull/54258
>> that
>> > > > >> switches
>> > > > >> > > > > > `pre-commit` we used for several years to `prek` in CI
>> and
>> > > > >> breeze.
>> > > > >> > > The
>> > > > >> > > > > > `prek` tool is faster, leaner and has already more
>> > features
>> > > we
>> > > > >> > wanted
>> > > > >> > > > to
>> > > > >> > > > > > have in the last few years for pre-commit and we had to
>> > add
>> > > > >> them in
>> > > > >> > > > > breeze
>> > > > >> > > > > > - a lot of them added in a matter of last few days in
>> the
>> > > > >> course of
>> > > > >> > > > > > collaboration with the author.
>> > > > >> > > > > >
>> > > > >> > > > > > In short what everyone should do now (at earliest
>> > > > convenience):
>> > > > >> > > > > >
>> > > > >> > > > > > *uv tool install prek*
>> > > > >> > > > > > *prek install -f*
>> > > > >> > > > > >
>> > > > >> > > > > > That's all you need to do, to switch.
>> > > > >> > > > > >
>> > > > >> > > > > > The documentation on how to use`prek` is updated in
>> > > > >> > > > > >
>> > > > >> > > > > >
>> > > > >> > > > >
>> > > > >> > > >
>> > > > >> > >
>> > > > >> >
>> > > > >>
>> > > >
>> > >
>> >
>> https://github.com/apache/airflow/blob/main/contributing-docs/08_static_code_checks.rst
>> > > > >> > > > > >
>> > > > >> > > > > > Here is the short(?) recap:
>> > > > >> > > > > >
>> > > > >> > > > > > *On running prek:*
>> > > > >> > > > > >
>> > > > >> > > > > > Running pre-commit hooks is as easy as running
>> `*prek*`.
>> > > That
>> > > > >> > should
>> > > > >> > > > work
>> > > > >> > > > > > in most cases out-of-the-box (no need even to add
>> `run`).
>> > If
>> > > > you
>> > > > >> > have
>> > > > >> > > > > > `prek` installed with `prek install` - it will just run
>> > > > >> > automatically
>> > > > >> > > > > when
>> > > > >> > > > > > you commit your code.
>> > > > >> > > > > >
>> > > > >> > > > > > We removed `breeze static-checks` because `prek`
>> > implements
>> > > > >> > > practically
>> > > > >> > > > > all
>> > > > >> > > > > > the functionality we had to add in breeze in order to
>> > > > compensate
>> > > > >> > for
>> > > > >> > > > lack
>> > > > >> > > > > > of cooperation from pre-commit maintainers
>> (auto-commit,
>> > > > >> > > --last-commit,
>> > > > >> > > > > > --only-my-changes . When you run `breeze static check`
>> you
>> > > > will
>> > > > >> > see a
>> > > > >> > > > > > removal message and instructions on how to switch to
>> prek.
>> > > > >> > > > > >
>> > > > >> > > > > > One notable change is that breeze's `--only-my-changes
>> `
>> > can
>> > > > be
>> > > > >> > > > achieved
>> > > > >> > > > > > with `*prek --from-ref main*` (and it also works now
>> for
>> > > past
>> > > > >> > > branches
>> > > > >> > > > if
>> > > > >> > > > > > you are working on PR  that was branched from v3-0-test
>> > for
>> > > > >> example
>> > > > >> > > > > (`prek
>> > > > >> > > > > > --from-ref v3-0-test` )
>> > > > >> > > > > >
>> > > > >> > > > > > *On why we switched:*
>> > > > >> > > > > >
>> > > > >> > > > > > The `prek` tool is written in Rust and *Jo* (sorry I
>> > > > misspelled
>> > > > >> > your
>> > > > >> > > > name
>> > > > >> > > > > > before): https://github.com/j178  -  has gone above
>> and
>> > > > beyond
>> > > > >> and
>> > > > >> > > > > > accommodated all our comments and issues we found
>> during
>> > the
>> > > > >> > > > development.
>> > > > >> > > > > > Including the likely toughest decision ever on changing
>> > name
>> > > > >> from
>> > > > >> > > > > prefligit
>> > > > >> > > > > > to prek. A lot of people helped to test it and reported
>> > (and
>> > > > >> helped
>> > > > >> > > > > fixing
>> > > > >> > > > > > some initial issue) and with 0.0.26 released yesterday,
>> > > `prek`
>> > > > >> > seems
>> > > > >> > > to
>> > > > >> > > > > be
>> > > > >> > > > > > ready to be used in our CI and local development. The
>> last
>> > > > issue
>> > > > >> > that
>> > > > >> > > > was
>> > > > >> > > > > > blocker, was with pseudo-terminal allocation and
>> colors in
>> > > the
>> > > > >> > > failure
>> > > > >> > > > > > output from ruff and others. It is a pleasure to work
>> with
>> > > Jo
>> > > > >> (and
>> > > > >> > I
>> > > > >> > > > > > started to learn a bit rust while doing so  :D). Big
>> > thanks
>> > > to
>> > > > >> Jo
>> > > > >> > for
>> > > > >> > > > the
>> > > > >> > > > > > dedication and persistence and "user-focused-thinking".
>> > > Thanks
>> > > > >> to
>> > > > >> > Ash
>> > > > >> > > > for
>> > > > >> > > > > > all the encouragement for Jo as well and all the
>> initial
>> > > push
>> > > > >> of us
>> > > > >> > > in
>> > > > >> > > > > the
>> > > > >> > > > > > "prefligit" direction.
>> > > > >> > > > > >
>> > > > >> > > > > > There are more things to come and we have a way to
>> force a
>> > > > >> minimum
>> > > > >> > > > > version
>> > > > >> > > > > > of prek when we start using the upcoming versions
>> > > > >> > > > (`minimum_prek_version`
>> > > > >> > > > > > is now set to 0.0.26).
>> > > > >> > > > > >
>> > > > >> > > > > > *On pre-commit compatibility:*
>> > > > >> > > > > >
>> > > > >> > > > > > For now, the .pre-commit-config.yaml is compatible with
>> > the
>> > > > >> latest
>> > > > >> > > > > > pre-commit (it will just raise a warning now as
>> > > > >> > prek_minimum_version
>> > > > >> > > is
>> > > > >> > > > > > unknown to it). You can continue using `pre-commit`
>> for a
>> > > > while
>> > > > >> -
>> > > > >> > but
>> > > > >> > > > > this
>> > > > >> > > > > > warning will remind you to switch to `prek` at earliest
>> > > > >> > convenience.
>> > > > >> > > At
>> > > > >> > > > > > some point of time when `prek` will have better
>> monorepo
>> > > > >> support we
>> > > > >> > > > will
>> > > > >> > > > > > likely split our pre-commit config to multiple files at
>> > > which
>> > > > >> point
>> > > > >> > > we
>> > > > >> > > > > will
>> > > > >> > > > > > only support `prek` (unless pre-commit will catch up
>> and
>> > > > >> implement
>> > > > >> > > > > > compatible feature, but I have no high hopes for that)
>> > > > >> > > > > >
>> > > > >> > > > > > *If you have errors:*
>> > > > >> > > > > >
>> > > > >> > > > > > Of course we should be watching for any teething
>> issues -
>> > so
>> > > > >> please
>> > > > >> > > > > report
>> > > > >> > > > > > any issues in #contributors or #internal-airflow-ci-cd
>> > Slack
>> > > > >> > > channels.
>> > > > >> > > > > >
>> > > > >> > > > > > If needs be - you can switch back to pre-commit by:
>> > > > >> > > > > >
>> > > > >> > > > > > *prek uninstall*
>> > > > >> > > > > > *pre-commit install *
>> > > > >> > > > > >
>> > > > >> > > > > > J.
>> > > > >> > > > > >
>> > > > >> > > > >
>> > > > >> > > >
>> > > > >> > >
>> > > > >> >
>> > > > >>
>> > > > >
>> > > >
>> > >
>> >
>>
>

Reply via email to