Under which category would you file this issue?
Task SDK
Apache Airflow version
main (development checkout)
What happened and how to reproduce it?
Issue description
The Task SDK and AirflowCTL datamodel-generation prek hooks pass distribution names to uv run --project. uv expects --project to identify an existing project directory or pyproject.toml, not a distribution name.
Both hook entries already use --directory with the actual project directory, so the invalid --project option is unnecessary:
generate-tasksdk-datamodels: --project apache-airflow-task-sdk --directory task-sdk
generate-airflowctl-datamodels: --project apache-airflow-ctl --directory airflow-ctl
uv 0.12 rejects the missing directories before either generator runs.
Steps to reproduce
-
Use a checkout containing the current .pre-commit-config.yaml entries, with uv 0.12.3 and prek 0.4.13.
-
Run:
$ prek run generate-tasksdk-datamodels --all-files
Generate Datamodels for TaskSDK client...................................Failed
- hook id: generate-tasksdk-datamodels
- exit code: 2
error: Project directory `apache-airflow-task-sdk` does not exist
-
Run:
$ prek run generate-airflowctl-datamodels --all-files
Generate Datamodels for AirflowCTL.......................................Failed
- hook id: generate-airflowctl-datamodels
- exit code: 2
error: Project directory `apache-airflow-ctl` does not exist
uv 0.11.29 emits a warning and continues, which masks the invalid arguments:
warning: Project directory `apache-airflow-task-sdk` does not exist.
This will become an error in a future release.
It is therefore not a durable workaround. In addition, the 0.11 execution refreshed uv.lock even though generated Task SDK model output did not change.
What you think should happen instead?
Both codegen hooks should run successfully with uv 0.12+ when their generated output is current.
Remove the invalid --project apache-airflow-task-sdk and --project apache-airflow-ctl arguments while retaining the existing --directory task-sdk and --directory airflow-ctl options. The corresponding command examples in task-sdk/pyproject.toml and airflow-ctl/pyproject.toml should be corrected in the same change.
Operating System
Ubuntu 24.04.1 LTS (WSL)
Deployment
Other — local development checkout using prek
Apache Airflow Provider(s)
Not applicable
Versions of Apache Airflow Providers
Not applicable
Official Helm Chart version
Not Applicable
Kubernetes Version
Not Applicable
Helm Chart configuration
Not Applicable
Docker Image customizations
Not Applicable
Anything else?
The code generators themselves run successfully through Breeze when invoked with the actual project directories. This is a local-development hook configuration issue, not an API model-generation failure.
Are you willing to submit PR?
Code of Conduct
Drafted-by: Codex (GPT-5) (no human review before posting)
Under which category would you file this issue?
Task SDK
Apache Airflow version
main(development checkout)What happened and how to reproduce it?
Issue description
The Task SDK and AirflowCTL datamodel-generation prek hooks pass distribution names to
uv run --project. uv expects--projectto identify an existing project directory orpyproject.toml, not a distribution name.Both hook entries already use
--directorywith the actual project directory, so the invalid--projectoption is unnecessary:generate-tasksdk-datamodels:--project apache-airflow-task-sdk --directory task-sdkgenerate-airflowctl-datamodels:--project apache-airflow-ctl --directory airflow-ctluv 0.12 rejects the missing directories before either generator runs.
Steps to reproduce
Use a checkout containing the current
.pre-commit-config.yamlentries, withuv 0.12.3andprek 0.4.13.Run:
Run:
uv 0.11.29emits a warning and continues, which masks the invalid arguments:It is therefore not a durable workaround. In addition, the 0.11 execution refreshed
uv.lockeven though generated Task SDK model output did not change.What you think should happen instead?
Both codegen hooks should run successfully with uv 0.12+ when their generated output is current.
Remove the invalid
--project apache-airflow-task-sdkand--project apache-airflow-ctlarguments while retaining the existing--directory task-sdkand--directory airflow-ctloptions. The corresponding command examples intask-sdk/pyproject.tomlandairflow-ctl/pyproject.tomlshould be corrected in the same change.Operating System
Ubuntu 24.04.1 LTS (WSL)
Deployment
Other — local development checkout using prek
Apache Airflow Provider(s)
Not applicable
Versions of Apache Airflow Providers
Not applicable
Official Helm Chart version
Not Applicable
Kubernetes Version
Not Applicable
Helm Chart configuration
Not Applicable
Docker Image customizations
Not Applicable
Anything else?
The code generators themselves run successfully through Breeze when invoked with the actual project directories. This is a local-development hook configuration issue, not an API model-generation failure.
Are you willing to submit PR?
Code of Conduct
Drafted-by: Codex (GPT-5) (no human review before posting)