From 659a3c200ef0211b512f2e303f06dc305e0cd2fd Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Wed, 12 Aug 2026 19:00:40 +0200 Subject: [PATCH] Use uv --package instead of --project in codegen prek hooks The two datamodel-codegen hooks passed workspace package names to --project, which takes a directory. uv 0.11 tolerated it; uv 0.12 validates the path and fails with "Project directory does not exist", blocking the CI environment upgrade. --package is the flag that takes a member name, and it works on both versions. --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7f8a908bb8e94..528a67c046f23 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1399,7 +1399,7 @@ repos: - id: generate-tasksdk-datamodels name: Generate Datamodels for TaskSDK client language: python - entry: uv run -p 3.12 --no-progress --active --group codegen --project apache-airflow-task-sdk --directory task-sdk -s dev/generate_task_sdk_models.py + entry: uv run -p 3.12 --no-progress --active --group codegen --package apache-airflow-task-sdk --directory task-sdk -s dev/generate_task_sdk_models.py pass_filenames: false files: ^airflow-core/src/airflow/api_fastapi/execution_api/.*\.py$ require_serial: true @@ -1408,8 +1408,8 @@ repos: language: python entry: > bash -c ' - uv run -p 3.12 --no-dev --no-progress --active --group codegen --project apache-airflow-ctl --directory airflow-ctl/ datamodel-codegen && - uv run -p 3.12 --no-dev --no-progress --active --group codegen --project apache-airflow-ctl --directory airflow-ctl/ datamodel-codegen --input="../airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v2-simple-auth-manager-generated.yaml" --output="src/airflowctl/api/datamodels/auth_generated.py"' + uv run -p 3.12 --no-dev --no-progress --active --group codegen --package apache-airflow-ctl --directory airflow-ctl/ datamodel-codegen && + uv run -p 3.12 --no-dev --no-progress --active --group codegen --package apache-airflow-ctl --directory airflow-ctl/ datamodel-codegen --input="../airflow-core/src/airflow/api_fastapi/auth/managers/simple/openapi/v2-simple-auth-manager-generated.yaml" --output="src/airflowctl/api/datamodels/auth_generated.py"' pass_filenames: false files: (?x)