jscheffl commented on code in PR #67367:
URL: https://github.com/apache/airflow/pull/67367#discussion_r3292437802
##########
.pre-commit-config.yaml:
##########
@@ -490,6 +490,20 @@ repos:
^providers/.*/src/.*\.py$|
^task-sdk/src/.*\.py$|
^shared/.*/src/.*\.py$
+ - id: check-http-exception-import-from-fastapi
+ name: Check HTTPException is imported from fastapi in fastapi-using
trees
+ entry: ./scripts/ci/prek/check_http_exception_import_from_fastapi.py
+ language: python
+ pass_filenames: true
+ files: >
+ (?x)
+ ^airflow-core/src/airflow/api_fastapi/.*\.py$|
+ ^airflow-core/tests/unit/api_fastapi/.*\.py$|
+ ^providers/amazon/(src|tests)/.*\.py$|
+ ^providers/common/ai/(src|tests)/.*\.py$|
+ ^providers/edge3/(src|tests)/.*\.py$|
Review Comment:
That check willr aise false-positives. Edge containes both client and server
sides.
All code in providers/edge3/src/airflow/providers/edge3/worker_api and
providers/edge3/src/airflow/providers/edge3/plugins is the API/Server side but
in providers/edge3/src/airflow/providers/edge3/cli is is the client (where the
FastAPI import will be wrong!)
--
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]