From dcf4d44d816e560381d77b1c1664e6e4071109db Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Tue, 24 Dec 2024 17:09:28 +0100 Subject: [PATCH] Fix potential race on modifying __init__.py for providers Two things: * limit number of __init__.py files that might trigger the update * make the updates serial --- .pre-commit-config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e06068a02bd39..a769a5e109bde 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -364,8 +364,9 @@ repos: entry: ./scripts/ci/pre_commit/update_providers_init.py language: python pass_filenames: true - files: ^providers/.*/__init__.py$|^providers/.*/provider.yaml$|^airflow_breeze/templates/PROVIDER__INIT__PY_TEMPLATE.py.jinja2^ + files: ^providers/[^\/]*/__init__.py$|^providers/[^\/]*/[^\/]*/__init__.py$|^providers/.*/provider.yaml$|^airflow_breeze/templates/PROVIDER__INIT__PY_TEMPLATE.py.jinja2^ additional_dependencies: ['rich>=12.4.4','requests'] + require_serial: true - id: ruff name: Run 'ruff' for extremely fast Python linting description: "Run 'ruff' for extremely fast Python linting"