Skip to content

Commit e354403

Browse files
committed
Do not run FAB pre-commits in release branches
The openapi generation scripts were run together for FAB and main openapi from core - however we do not want to re-run those scripts at all in non-main branch - i.e. branch we prepare providers from. This PR splits the openapi script and removes all fab pre-commits from running in non-main branch.
1 parent 62678f9 commit e354403

File tree

13 files changed

+216
-115
lines changed

13 files changed

+216
-115
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,15 @@ repos:
13411341
- id: generate-openapi-spec
13421342
name: Generate the FastAPI API spec
13431343
language: python
1344-
entry: ./scripts/ci/pre_commit/update_fastapi_api_spec.py
1344+
entry: ./scripts/ci/pre_commit/generate_openapi_spec.py
1345+
pass_filenames: false
1346+
files: ^airflow-core/src/airflow/api_fastapi/.*\.py$|^airflow-core/src/airflow/api_fastapi/auth/managers/simple/.*\.py$|^providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/.*\.py$
1347+
exclude: ^airflow-core/src/airflow/api_fastapi/execution_api/.*
1348+
additional_dependencies: ['rich>=12.4.4', 'openapi-spec-validator>=0.7.1']
1349+
- id: generate-openapi-spec-fab
1350+
name: Generate the FastAPI API spec for FAB
1351+
language: python
1352+
entry: ./scripts/ci/pre_commit/generate_openapi_spec_fab.py
13451353
pass_filenames: false
13461354
files: ^airflow-core/src/airflow/api_fastapi/.*\.py$|^airflow-core/src/airflow/api_fastapi/auth/managers/simple/.*\.py$|^providers/fab/src/airflow/providers/fab/auth_manager/api_fastapi/.*\.py$
13471355
exclude: ^airflow-core/src/airflow/api_fastapi/execution_api/.*

contributing-docs/08_static_code_checks.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ require Breeze Docker image to be built locally.
279279
+-----------------------------------------------------------+--------------------------------------------------------+---------+
280280
| generate-openapi-spec | Generate the FastAPI API spec | * |
281281
+-----------------------------------------------------------+--------------------------------------------------------+---------+
282+
| generate-openapi-spec-fab | Generate the FastAPI API spec for FAB | * |
283+
+-----------------------------------------------------------+--------------------------------------------------------+---------+
282284
| generate-pypi-readme | Generate PyPI README | |
283285
+-----------------------------------------------------------+--------------------------------------------------------+---------+
284286
| generate-tasksdk-datamodels | Generate Datamodels for TaskSDK client | * |

dev/breeze/doc/images/output-commands.svg

Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)