Skip to content

Commit 51645de

Browse files
potiukkaxil
authored andcommitted
[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 Lucas-C/pre-commit-hooks#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 535d71d)
1 parent d5e5dff commit 51645de

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.github/actions/migration_tests/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ runs:
2424
- name: "Test migration file 2 to 3 migration: ${{env.BACKEND}}"
2525
shell: bash
2626
run: |
27-
breeze shell "${{ env.AIRFLOW_2_CMD }}" --use-airflow-version 2.11.0 --answer y &&
28-
breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANGERS}}
29-
${{ env.AIRFLOW_3_CMD }}" --no-db-cleanup
27+
breeze shell "${AIRFLOW_2_CMD}" --use-airflow-version 2.11.0 --answer y &&
28+
breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANGERS}
29+
${AIRFLOW_3_CMD}" --no-db-cleanup
3030
env:
3131
COMPOSE_PROJECT_NAME: "docker-compose"
3232
DB_RESET: "false"
@@ -47,9 +47,9 @@ runs:
4747
- name: "Test ORM migration 2 to 3: ${{env.BACKEND}}"
4848
shell: bash
4949
run: >
50-
breeze shell "${{ env.AIRFLOW_2_CMD }}" --use-airflow-version 2.11.0 --answer y &&
51-
breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANGERS}}
52-
${{ env.AIRFLOW_3_CMD }}" --no-db-cleanup
50+
breeze shell "${AIRFLOW_2_CMD}" --use-airflow-version 2.11.0 --answer y &&
51+
breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANGERS}
52+
${AIRFLOW_3_CMD}" --no-db-cleanup
5353
env:
5454
COMPOSE_PROJECT_NAME: "docker-compose"
5555
DB_RESET: "false"
@@ -69,7 +69,7 @@ runs:
6969
- name: "Test ORM migration ${{env.BACKEND}}"
7070
shell: bash
7171
run: >
72-
breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANAGERS}} &&
72+
breeze shell "export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANAGERS} &&
7373
airflow db reset -y &&
7474
airflow db migrate --to-revision heads &&
7575
airflow db downgrade -n 2.7.0 -y &&
@@ -86,7 +86,7 @@ runs:
8686
shell: bash
8787
run: >
8888
breeze shell
89-
"export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${{env.DB_MANAGERS}} &&
89+
"export AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS=${DB_MANAGERS} &&
9090
airflow db reset -y &&
9191
airflow db downgrade -n 2.7.0 -y &&
9292
airflow db migrate -s"

.github/workflows/basic-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,8 @@ jobs:
267267
skip-pre-commits: ${{ inputs.skip-pre-commits }}
268268
- name: "Autoupdate all pre-commits"
269269
run: pre-commit autoupdate
270+
- name: "Autoupdate Lucas-C/pre-commit-hooks to bleeding edge"
271+
run: pre-commit autoupdate --bleeding-edge --freeze --repo https://github.com/Lucas-C/pre-commit-hooks
270272
- name: "Run automated upgrade for black"
271273
run: >
272274
pre-commit run

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ repos:
4949
- "--maxlevel"
5050
- "2"
5151
- repo: https://github.com/Lucas-C/pre-commit-hooks
52-
rev: v1.5.5
52+
# replace hash with version once PR #103 merged comes in a release
53+
rev: abdd8b62891099da34162217ecb3872d22184a51
5354
hooks:
5455
- id: insert-license
5556
name: Add license for all SQL files
@@ -356,7 +357,7 @@ repos:
356357
- --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
357358
- --exclude-file=.codespellignorelines
358359
- repo: https://github.com/woodruffw/zizmor-pre-commit
359-
rev: v1.7.0
360+
rev: v1.11.0
360361
hooks:
361362
- id: zizmor
362363
name: Run zizmor to check for github workflow syntax errors

0 commit comments

Comments
 (0)