You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2025/07/07 11:03:01 UTC
(airflow) 10/11: [v3-0-test] Workaround the need to use latest version on Lucas pre-commit's (#52931) (#52942)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 25a75791bd8941e2b8a2c91f516c8eacd5b93f3f
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Sun Jul 6 21:13:35 2025 +0200
[v3-0-test] Workaround the need to use latest version on Lucas pre-commit's (#52931) (#52942)
We are still waiting for release of the Lucas's pre-commit after
the https://github.com/Lucas-C/pre-commit-hooks/pull/103 has
been merged - and for now we need to use `bleeding-edge` for
the repo.
Also upgrades zizmor and solves using "env." in shell commands
that might lead to security issues.
(cherry picked from commit 535d71d91f36d3d9859d32e4695f0e81a2696a4b)
---
.github/actions/migration_tests/action.yml | 16 ++++++++--------
.github/workflows/basic-tests.yml | 2 ++
.pre-commit-config.yaml | 5 +++--
3 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/.github/actions/migration_tests/action.yml b/.github/actions/migration_tests/action.yml
index 0198cbf472b..34951bac5ff 100644
--- a/.github/actions/migration_tests/action.yml
+++ b/.github/actions/migration_tests/action.yml
@@ -24,9 +24,9 @@ runs:
- name: "Test migration file 2 to 3 migration: ${{env.BACKEND}}"
shell: bash
run: |
- breeze shell "${{ env.AIRFLOW_2_CMD }}" --use-airflow-version 2.11.0 --answer y &&
- breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANGERS}}
- ${{ env.AIRFLOW_3_CMD }}" --no-db-cleanup
+ breeze shell "${AIRFLOW_2_CMD}" --use-airflow-version 2.11.0 --answer y &&
+ breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANGERS}
+ ${AIRFLOW_3_CMD}" --no-db-cleanup
env:
COMPOSE_PROJECT_NAME: "docker-compose"
DB_RESET: "false"
@@ -47,9 +47,9 @@ runs:
- name: "Test ORM migration 2 to 3: ${{env.BACKEND}}"
shell: bash
run: >
- breeze shell "${{ env.AIRFLOW_2_CMD }}" --use-airflow-version 2.11.0 --answer y &&
- breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANGERS}}
- ${{ env.AIRFLOW_3_CMD }}" --no-db-cleanup
+ breeze shell "${AIRFLOW_2_CMD}" --use-airflow-version 2.11.0 --answer y &&
+ breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANGERS}
+ ${AIRFLOW_3_CMD}" --no-db-cleanup
env:
COMPOSE_PROJECT_NAME: "docker-compose"
DB_RESET: "false"
@@ -69,7 +69,7 @@ runs:
- name: "Test ORM migration ${{env.BACKEND}}"
shell: bash
run: >
- breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANAGERS}} &&
+ breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANAGERS} &&
airflow db reset -y &&
airflow db migrate --to-revision heads &&
airflow db downgrade -n 2.7.0 -y &&
@@ -86,7 +86,7 @@ runs:
shell: bash
run: >
breeze shell
- "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANAGERS}} &&
+ "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANAGERS} &&
airflow db reset -y &&
airflow db downgrade -n 2.7.0 -y &&
airflow db migrate -s"
diff --git a/.github/workflows/basic-tests.yml b/.github/workflows/basic-tests.yml
index 59a326d49b1..bc23674f442 100644
--- a/.github/workflows/basic-tests.yml
+++ b/.github/workflows/basic-tests.yml
@@ -267,6 +267,8 @@ jobs:
skip-pre-commits: ${{ inputs.skip-pre-commits }}
- name: "Autoupdate all pre-commits"
run: pre-commit autoupdate
+ - name: "Autoupdate Lucas-C/pre-commit-hooks to bleeding edge"
+ run: pre-commit autoupdate --bleeding-edge --freeze --repo https://github.com/Lucas-C/pre-commit-hooks
- name: "Run automated upgrade for black"
run: >
pre-commit run
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 3dc226a64df..3adeefd79b6 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -49,7 +49,8 @@ repos:
- "--maxlevel"
- "2"
- repo: https://github.com/Lucas-C/pre-commit-hooks
- rev: v1.5.5
+ # replace hash with version once PR #103 merged comes in a release
+ rev: abdd8b62891099da34162217ecb3872d22184a51
hooks:
- id: insert-license
name: Add license for all SQL files
@@ -356,7 +357,7 @@ repos:
- --skip=providers/.*/src/airflow/providers/*/*.rst,providers/*/docs/changelog.rst,docs/*/commits.rst,providers/*/docs/commits.rst,providers/*/*/docs/commits.rst,docs/apache-airflow/tutorial/pipeline_example.csv,*.min.js,*.lock,INTHEWILD.md,*.svg
- --exclude-file=.codespellignorelines
- repo: https://github.com/woodruffw/zizmor-pre-commit
- rev: v1.7.0
+ rev: v1.11.0
hooks:
- id: zizmor
name: Run zizmor to check for github workflow syntax errors