Skip to content

Commit 31fa445

Browse files
committed
ci: enable alembic check in migration tests
1 parent c874e8d commit 31fa445

File tree

4 files changed

+54
-1
lines changed

4 files changed

+54
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
#
18+
---
19+
name: 'Run Alembic check'
20+
description: 'Runs Alembic check'
21+
runs:
22+
using: "composite"
23+
steps:
24+
- name: "Run Alembic check: ${{env.BACKEND}}"
25+
shell: bash
26+
run: |
27+
breeze shell "cd airflow-core/src/airflow && alembic check"
28+
env:
29+
COMPOSE_PROJECT_NAME: "docker-compose"
30+
AIRFLOW__DATABASE__EXTERNAL_DB_MANAGERS: "airflow.providers.fab.auth_manager.models.db.FABDBManager"
31+
DB_RESET: "false"
32+
if: env.BACKEND != 'sqlite'
33+
- name: "Bring any containers left down"
34+
shell: bash
35+
run: breeze down
36+
env:
37+
COMPOSE_PROJECT_NAME: "docker-compose"
38+
- name: "Dump logs on failure ${{env.BACKEND}}"
39+
shell: bash
40+
run: docker ps -q | xargs docker logs
41+
if: failure()

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ jobs:
359359
${{ needs.build-info.outputs.core-test-types-list-as-strings-in-json }}
360360
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
361361
run-migration-tests: "true"
362+
run-alembic-check: "true"
362363
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
363364
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
364365
skip-providers-tests: ${{ needs.build-info.outputs.skip-providers-tests }}
@@ -414,6 +415,7 @@ jobs:
414415
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
415416
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
416417
run-migration-tests: "true"
418+
run-alembic-check: "true"
417419
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
418420
skip-providers-tests: ${{ needs.build-info.outputs.skip-providers-tests }}
419421
use-uv: ${{ needs.build-info.outputs.use-uv }}
@@ -471,6 +473,7 @@ jobs:
471473
include-success-outputs: ${{ needs.build-info.outputs.include-success-outputs }}
472474
run-coverage: ${{ needs.build-info.outputs.run-coverage }}
473475
run-migration-tests: "true"
476+
run-alembic-check: "true"
474477
debug-resources: ${{ needs.build-info.outputs.debug-resources }}
475478
skip-providers-tests: ${{ needs.build-info.outputs.skip-providers-tests }}
476479
use-uv: ${{ needs.build-info.outputs.use-uv }}

.github/workflows/run-unit-tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ on: # yamllint disable-line rule:truthy
7070
required: false
7171
default: "false"
7272
type: string
73+
run-alembic-check:
74+
description: "Whether to run alembic check or not (true/false)"
75+
required: false
76+
default: "false"
77+
type: string
7378
run-coverage:
7479
description: "Whether to run coverage or not (true/false)"
7580
required: true
@@ -171,6 +176,10 @@ jobs:
171176
platform: "linux/amd64"
172177
python: ${{ matrix.python-version }}
173178
use-uv: ${{ inputs.use-uv }}
179+
- name: >
180+
Alembic Check: ${{ matrix.python-version }}:${{ env.PARALLEL_TEST_TYPES }}
181+
uses: ./.github/actions/alembic_check
182+
if: inputs.run-alembic-check == 'true' && inputs.test-group == 'core'
174183
- name: >
175184
Migration Tests: ${{ matrix.python-version }}:${{ env.PARALLEL_TEST_TYPES }}
176185
uses: ./.github/actions/migration_tests

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2173,7 +2173,7 @@ class DagModel(Base):
21732173
# Description of the dag
21742174
description = Column(Text)
21752175
# Timetable summary
2176-
timetable_summary = Column(Text, nullable=True)
2176+
timetable_summary = Column(String(5000), nullable=False)
21772177
# Timetable description
21782178
timetable_description = Column(String(1000), nullable=True)
21792179
# Asset expression based on asset triggers

0 commit comments

Comments
 (0)