Skip to content

Commit cc8b840

Browse files
committed
ci: add alembic check
1 parent b563f1b commit cc8b840

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/actions/migration_tests/action.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ runs:
3232
DB_RESET: "false"
3333
AIRFLOW_2_CMD: >-
3434
airflow db reset --skip-init -y &&
35-
airflow db migrate --to-revision heads
35+
airflow db migrate --to-revision heads &&
36+
cd airflow-core/src/airflow && alembic check
3637
AIRFLOW_3_CMD: >-
3738
airflow db migrate --to-revision heads &&
3839
airflow db downgrade -n 2.7.0 -y &&
39-
airflow db migrate
40+
airflow db migrate &&
41+
cd airflow-core/src/airflow && alembic check
4042
if: env.BACKEND != 'sqlite'
4143
- name: "Bring composer down"
4244
shell: bash
@@ -57,7 +59,8 @@ runs:
5759
AIRFLOW_3_CMD: >-
5860
airflow db migrate --to-revision heads &&
5961
airflow db downgrade -n 2.7.0 -y &&
60-
airflow db migrate
62+
airflow db migrate &&
63+
cd airflow-core/src/airflow && alembic check
6164
if: env.BACKEND != 'sqlite'
6265
- name: "Bring compose down again"
6366
shell: bash
@@ -70,7 +73,8 @@ runs:
7073
breeze shell "airflow db reset -y &&
7174
airflow db migrate --to-revision heads &&
7275
airflow db downgrade -n 2.7.0 -y &&
73-
airflow db migrate"
76+
airflow db migrate &&
77+
cd airflow-core/src/airflow && alembic check"
7478
env:
7579
COMPOSE_PROJECT_NAME: "docker-compose"
7680
AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS: "airflow.providers.fab.auth_manager.models.db.FABDBManager"

airflow-core/src/airflow/models/dag.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ class DagModel(Base):
21702170
# Note: Do not depend on fileloc pointing to a file; in the case of a
21712171
# packaged DAG, it will point to the subpath of the DAG within the
21722172
# associated zip.
2173-
fileloc = Column(String(2000))
2173+
# fileloc = Column(String(2000))
21742174
relative_fileloc = Column(String(2000))
21752175
bundle_name = Column(StringID(), ForeignKey("dag_bundle.name"), nullable=True)
21762176
# The version of the bundle the last time the DAG was processed

0 commit comments

Comments
 (0)