rino0601 opened a new issue, #71377:
URL: https://github.com/apache/airflow/issues/71377

   ### 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
   
   1. Use a checkout containing the current `.pre-commit-config.yaml` entries, 
with `uv 0.12.3` and `prek 0.4.13`.
   2. Run:
   
      ```console
      $ 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
      ```
   
   3. Run:
   
      ```console
      $ 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:
   
   ```text
   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?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   
   ---
   
   Drafted-by: Codex (GPT-5) (no human review before posting)
   


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