From 1ab683f3ea0de3e6f9b06824d8a4421ebe63be12 Mon Sep 17 00:00:00 2001 From: Elad Kalif <45845474+eladkal@users.noreply.github.com> Date: Thu, 26 Jun 2025 23:23:59 +0300 Subject: [PATCH 1/2] Remove pre-commit check-daysago-import-from-utils --- .pre-commit-config.yaml | 6 ------ contributing-docs/08_static_code_checks.rst | 2 -- dev/breeze/src/airflow_breeze/pre_commit_ids.py | 1 - 3 files changed, 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3f0ed6026d5f9..c31f3d6d7b153 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -868,12 +868,6 @@ repos: entry: "LoggingMixin\\(\\)" files: \.py$ pass_filenames: true - - id: check-daysago-import-from-utils - language: pygrep - name: days_ago imported from airflow.utils.dates - entry: "(airflow\\.){0,1}utils\\.dates\\.days_ago" - files: \.py$ - pass_filenames: true - id: check-start-date-not-used-in-defaults language: pygrep name: start_date not in default_args diff --git a/contributing-docs/08_static_code_checks.rst b/contributing-docs/08_static_code_checks.rst index 2081419349f2c..db0c4e3129d7b 100644 --- a/contributing-docs/08_static_code_checks.rst +++ b/contributing-docs/08_static_code_checks.rst @@ -155,8 +155,6 @@ require Breeze Docker image to be built locally. +-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-core-deprecation-classes | Verify usage of Airflow deprecation classes in core | | +-----------------------------------------------------------+--------------------------------------------------------+---------+ -| check-daysago-import-from-utils | days_ago imported from airflow.utils.dates | | -+-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-decorated-operator-implements-custom-name | Check @task decorator implements custom_operator_name | | +-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-default-configuration | Check the default configuration | * | diff --git a/dev/breeze/src/airflow_breeze/pre_commit_ids.py b/dev/breeze/src/airflow_breeze/pre_commit_ids.py index f2ce310cc5046..c5ad5b2040a4e 100644 --- a/dev/breeze/src/airflow_breeze/pre_commit_ids.py +++ b/dev/breeze/src/airflow_breeze/pre_commit_ids.py @@ -41,7 +41,6 @@ "check-code-deprecations", "check-common-compat-used-for-openlineage", "check-core-deprecation-classes", - "check-daysago-import-from-utils", "check-decorated-operator-implements-custom-name", "check-default-configuration", "check-deferrable-default", From 1808c67dfb50a3b5d61314276903cbc04994cc9b Mon Sep 17 00:00:00 2001 From: Elad Kalif <45845474+eladkal@users.noreply.github.com> Date: Thu, 26 Jun 2025 23:58:42 +0300 Subject: [PATCH 2/2] fixes --- dev/breeze/doc/images/output-commands.svg | 4 +- .../doc/images/output_static-checks.svg | 160 +++++++++--------- .../doc/images/output_static-checks.txt | 2 +- 3 files changed, 81 insertions(+), 85 deletions(-) diff --git a/dev/breeze/doc/images/output-commands.svg b/dev/breeze/doc/images/output-commands.svg index c82c8759006e7..234bfa5ee81a3 100644 --- a/dev/breeze/doc/images/output-commands.svg +++ b/dev/breeze/doc/images/output-commands.svg @@ -329,8 +329,8 @@ gremlin | kafka | kerberos | keycloak | mongo | mssql | openlineage | otel | pinot | qdrant | redis | statsd |  trino | ydb)                                            ---standalone-dag-processor/--no-standalone-dag-process…Run standalone dag processor for start-airflow          -(required for Airflow 3).                               +--standalone-dag-processor/--no-standalone-dag-processoRun standalone dag processor for start-airflow          +r(required for Airflow 3).                               [default: standalone-dag-processor]                     ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Docker Compose selection and cleanup ───────────────────────────────────────────────────────────────────────────────╮ diff --git a/dev/breeze/doc/images/output_static-checks.svg b/dev/breeze/doc/images/output_static-checks.svg index d7ef8a1294667..9918dedfb8bfb 100644 --- a/dev/breeze/doc/images/output_static-checks.svg +++ b/dev/breeze/doc/images/output_static-checks.svg @@ -1,4 +1,4 @@ - + check-changelog-format | check-changelog-has-no-duplicates |                      check-cncf-k8s-only-for-executors | check-code-deprecations |                     check-common-compat-used-for-openlineage | check-core-deprecation-classes |       -check-daysago-import-from-utils | check-decorated-operator-implements-custom-name -| check-default-configuration | check-deferrable-default |                        -check-docstring-param-types | check-example-dags-urls |                           -check-executables-have-shebangs | check-extra-packages-references |               -check-extras-order | check-fab-migrations | check-for-inclusive-language |        -check-get-lineage-collector-providers | check-hooks-apply | check-i18n-json |     -check-imports-in-providers | check-incorrect-use-of-LoggingMixin |                -check-init-decorator-arguments | check-integrations-list-consistent |             -check-lazy-logging | check-links-to-example-dags-do-not-use-hardcoded-versions |  -check-merge-conflict | check-min-python-version | check-newsfragments-are-valid | -check-no-airflow-deprecation-in-providers | check-no-providers-in-core-examples | -check-only-new-session-with-provide-session |                                     -check-persist-credentials-disabled-in-github-workflows |                          -check-pre-commit-information-consistent | check-provide-create-sessions-imports | -check-provider-docs-valid | check-provider-yaml-valid |                           -check-providers-subpackages-init-file-exist | check-pydevd-left-in-code |         -check-pytest-mark-db-test-in-providers | check-revision-heads-map |               -check-safe-filter-usage-in-html | check-significant-newsfragments-are-valid |     -check-sql-dependency-common-data-structure |                                      -check-start-date-not-used-in-defaults | check-system-tests-present |              -check-system-tests-tocs | check-taskinstance-tis-attrs |                          -check-template-context-variable-in-sync | check-template-fields-valid |           -check-tests-in-the-right-folders | check-tests-unittest-testcase |                -check-urlparse-usage-in-code | check-xml | check-zip-file-is-not-committed |      -codespell | compile-fab-assets | compile-ui-assets | compile-ui-assets-dev |      -create-missing-init-py-files-tests | debug-statements | detect-private-key |      -doctoc | end-of-file-fixer | fix-encoding-pragma | flynt | gci |                  -generate-airflow-diagrams | generate-airflowctl-datamodels |                      -generate-airflowctl-help-images | generate-openapi-spec |                         -generate-openapi-spec-fab | generate-pypi-readme | generate-tasksdk-datamodels |  -generate-volumes-for-sources | go-mockery | go-mod-tidy | gofmt | identity |      -insert-license | kubeconform | lint-chart-schema | lint-dockerfile |              -lint-helm-chart | lint-json-schema | lint-markdown | mixed-line-ending |          -mypy-airflow-core | mypy-airflow-ctl | mypy-dev | mypy-devel-common |             -mypy-providers | mypy-task-sdk | pretty-format-json |                             -prevent-deprecated-sqlalchemy-usage | pylint | python-no-log-warn |               -replace-bad-characters | rst-backticks | ruff | ruff-format | shellcheck |        -trailing-whitespace | ts-compile-lint-simple-auth-manager-ui | ts-compile-lint-ui -| update-black-version | update-breeze-cmd-output |                               -update-breeze-readme-config-hash | update-chart-dependencies | update-er-diagram  -| update-in-the-wild-to-be-sorted | update-inlined-dockerfile-scripts |           -update-installed-providers-to-be-sorted | update-installers-and-pre-commit |      -update-local-yml-file | update-migration-references |                             -update-providers-build-files | update-providers-dependencies |                    -update-pyproject-toml | update-reproducible-source-date-epoch |                   -update-spelling-wordlist-to-be-sorted | update-supported-versions |               -update-vendored-in-k8s-json-schema | update-version | validate-operators-init |   -yamllint | zizmor)                                                                ---show-diff-on-failure-sShow diff for files modified by the checks. ---initialize-environmentInitialize environment before running checks. ---max-initialization-attemptsMaximum number of attempts to initialize environment before giving up. -(INTEGER RANGE)                                                        -[default: 3; 1<=x<=10]                                                 -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭─ Selecting files to run the checks on ───────────────────────────────────────────────────────────────────────────────╮ ---file-fList of files to run the checks on.(PATH) ---all-files-aRun checks on all files. ---commit-ref-rRun checks for this commit reference only (can be any git commit-ish reference). Mutually     -exclusive with --last-commit.                                                                 -(TEXT)                                                                                        ---last-commit-cRun checks for all files in last commit. Mutually exclusive with --commit-ref. ---only-my-changes-mRun checks for commits belonging to my PR only: for all commits between merge base to `main`  -branch and HEAD of your branch.                                                               -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭─ Building image before running checks ───────────────────────────────────────────────────────────────────────────────╮ ---skip-image-upgrade-checkSkip checking if the CI image is up to date. ---force-buildForce image build no matter if it is determined as needed. ---github-repository-gGitHub repository used to pull, push run images.(TEXT)[default: apache/airflow] ---builderBuildx builder used to perform `docker buildx build` commands.(TEXT) -[default: autodetect]                                          -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ -╭─ Common options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮ ---dry-run-DIf dry-run is set, commands are only printed, not executed. ---verbose-vPrint verbose information about performed steps. ---help-hShow this message and exit. -╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +check-decorated-operator-implements-custom-name | check-default-configuration |   +check-deferrable-default | check-docstring-param-types | check-example-dags-urls  +| check-executables-have-shebangs | check-extra-packages-references |             +check-extras-order | check-fab-migrations | check-for-inclusive-language |        +check-get-lineage-collector-providers | check-hooks-apply | check-i18n-json |     +check-imports-in-providers | check-incorrect-use-of-LoggingMixin |                +check-init-decorator-arguments | check-integrations-list-consistent |             +check-lazy-logging | check-links-to-example-dags-do-not-use-hardcoded-versions |  +check-merge-conflict | check-min-python-version | check-newsfragments-are-valid | +check-no-airflow-deprecation-in-providers | check-no-providers-in-core-examples | +check-only-new-session-with-provide-session |                                     +check-persist-credentials-disabled-in-github-workflows |                          +check-pre-commit-information-consistent | check-provide-create-sessions-imports | +check-provider-docs-valid | check-provider-yaml-valid |                           +check-providers-subpackages-init-file-exist | check-pydevd-left-in-code |         +check-pytest-mark-db-test-in-providers | check-revision-heads-map |               +check-safe-filter-usage-in-html | check-significant-newsfragments-are-valid |     +check-sql-dependency-common-data-structure |                                      +check-start-date-not-used-in-defaults | check-system-tests-present |              +check-system-tests-tocs | check-taskinstance-tis-attrs |                          +check-template-context-variable-in-sync | check-template-fields-valid |           +check-tests-in-the-right-folders | check-tests-unittest-testcase |                +check-urlparse-usage-in-code | check-xml | check-zip-file-is-not-committed |      +codespell | compile-fab-assets | compile-ui-assets | compile-ui-assets-dev |      +create-missing-init-py-files-tests | debug-statements | detect-private-key |      +doctoc | end-of-file-fixer | fix-encoding-pragma | flynt | gci |                  +generate-airflow-diagrams | generate-airflowctl-datamodels |                      +generate-airflowctl-help-images | generate-openapi-spec |                         +generate-openapi-spec-fab | generate-pypi-readme | generate-tasksdk-datamodels |  +generate-volumes-for-sources | go-mockery | go-mod-tidy | gofmt | identity |      +insert-license | kubeconform | lint-chart-schema | lint-dockerfile |              +lint-helm-chart | lint-json-schema | lint-markdown | mixed-line-ending |          +mypy-airflow-core | mypy-airflow-ctl | mypy-dev | mypy-devel-common |             +mypy-providers | mypy-task-sdk | pretty-format-json |                             +prevent-deprecated-sqlalchemy-usage | pylint | python-no-log-warn |               +replace-bad-characters | rst-backticks | ruff | ruff-format | shellcheck |        +trailing-whitespace | ts-compile-lint-simple-auth-manager-ui | ts-compile-lint-ui +| update-black-version | update-breeze-cmd-output |                               +update-breeze-readme-config-hash | update-chart-dependencies | update-er-diagram  +| update-in-the-wild-to-be-sorted | update-inlined-dockerfile-scripts |           +update-installed-providers-to-be-sorted | update-installers-and-pre-commit |      +update-local-yml-file | update-migration-references |                             +update-providers-build-files | update-providers-dependencies |                    +update-pyproject-toml | update-reproducible-source-date-epoch |                   +update-spelling-wordlist-to-be-sorted | update-supported-versions |               +update-vendored-in-k8s-json-schema | update-version | validate-operators-init |   +yamllint | zizmor)                                                                +--show-diff-on-failure-sShow diff for files modified by the checks. +--initialize-environmentInitialize environment before running checks. +--max-initialization-attemptsMaximum number of attempts to initialize environment before giving up. +(INTEGER RANGE)                                                        +[default: 3; 1<=x<=10]                                                 +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Selecting files to run the checks on ───────────────────────────────────────────────────────────────────────────────╮ +--file-fList of files to run the checks on.(PATH) +--all-files-aRun checks on all files. +--commit-ref-rRun checks for this commit reference only (can be any git commit-ish reference). Mutually     +exclusive with --last-commit.                                                                 +(TEXT)                                                                                        +--last-commit-cRun checks for all files in last commit. Mutually exclusive with --commit-ref. +--only-my-changes-mRun checks for commits belonging to my PR only: for all commits between merge base to `main`  +branch and HEAD of your branch.                                                               +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Building image before running checks ───────────────────────────────────────────────────────────────────────────────╮ +--skip-image-upgrade-checkSkip checking if the CI image is up to date. +--force-buildForce image build no matter if it is determined as needed. +--github-repository-gGitHub repository used to pull, push run images.(TEXT)[default: apache/airflow] +--builderBuildx builder used to perform `docker buildx build` commands.(TEXT) +[default: autodetect]                                          +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭─ Common options ─────────────────────────────────────────────────────────────────────────────────────────────────────╮ +--dry-run-DIf dry-run is set, commands are only printed, not executed. +--verbose-vPrint verbose information about performed steps. +--help-hShow this message and exit. +╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ diff --git a/dev/breeze/doc/images/output_static-checks.txt b/dev/breeze/doc/images/output_static-checks.txt index cf3bedd858f59..e1d3187c5864b 100644 --- a/dev/breeze/doc/images/output_static-checks.txt +++ b/dev/breeze/doc/images/output_static-checks.txt @@ -1 +1 @@ -95021976bf6a2815709538bf791ccdc8 +d0dc18a59b8997b9c06a3bd15879c8c7