fix(breeze): use prek from breeze bin instead of PATH#62277
fix(breeze): use prek from breeze bin instead of PATH#62277potiuk merged 3 commits intoapache:mainfrom
Conversation
52599e4 to
af8940c
Compare
9bcdcf7 to
1adb674
Compare
potiuk
left a comment
There was a problem hiding this comment.
Better solution will be to run prek via -m / module rather than modifying PATH
[sys.executable, "-m", "prek", ....]
@potiuk |
|
Opened a PR for -m option support in prek. Currently in review. I think it's best to merge this PR first, then update it once the version of prek supporting the -m option is officially released. |
|
Can you not simply use |
|
@potiuk Why do you prefer |
1adb674 to
ace4772
Compare
@CarliJoy I've updated the code to use shutil.which as you suggested. Thanks for the sharp catch! |
ace4772 to
d9a0ac0
Compare
|
@potiuk |
bac85fe to
ac4b754
Compare
ac4b754 to
3fab369
Compare
|
Nice! |
…2277) * fix(breeze): use prek from breeze bin instead of PATH * Apply review of @CarliJoy - shutil.which * Apply python -m prek (cherry picked from commit d785ca2) Co-authored-by: SeonghwanLee <[email protected]>
Backport successfully created: v3-1-testNote: As of Merging PRs targeted for Airflow 3.X In matter of doubt please ask in #release-management Slack channel.
|
…ache#62277) * fix(breeze): use prek from breeze bin instead of PATH * Apply review of @CarliJoy - shutil.which * Apply python -m prek (cherry picked from commit d785ca2) Co-authored-by: SeonghwanLee <[email protected]>



Related PR
prekdespite being updated to 0.3.3 #62272Problem
When running
breeze start-airflowor asset compilation, users could encounter:0.3.2is greater than current version0.2.25"This occurred because breeze was checking and invoking prek from


PATH, which could point to an older standalone installation (e.g.uv tool install prekat 0.2.25), while breeze's own environment had the correct version (0.3.3) in its bin directory.Solution
get_prek_executable(): New helper that returns the path to prek in the same bin directory as breeze's Python (sys.executable's parent)assert_prek_installed(): Usesget_prek_executable()instead of"prek"from PATH, so the version check uses breeze's prekrun_compile_ui_assets(): Usesget_prek_executable()instead of"prek", so asset compilation invokes the correct prek versionError message improvements
uv tool install -e ./dev/breeze --forceto reinstall breeze with updated dependenciesWas generative AI tooling used to co-author this PR?
cursor
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.