diff --git a/.github/workflows/linting-and-tests.yml b/.github/workflows/linting-and-tests.yml index d94506638..7a01bbe06 100644 --- a/.github/workflows/linting-and-tests.yml +++ b/.github/workflows/linting-and-tests.yml @@ -190,9 +190,15 @@ jobs: uses: actions/checkout@v4 - name: Setup Python uses: ./.github/actions/setup-python + - name: Wait for MySQL to be ready + working-directory: engine + run: ./wait_for_test_mysql_start.sh + - name: Test Django migrations work from blank slate + working-directory: engine + run: python manage.py migrate - name: Unit Test Backend working-directory: engine - run: ./wait_for_test_mysql_start.sh && pytest -x + run: pytest -x unit-test-backend-postgresql-rabbitmq: name: "Backend Tests: PostgreSQL + RabbitMQ (RBAC enabled: ${{ matrix.rbac_enabled }})" @@ -229,6 +235,9 @@ jobs: uses: actions/checkout@v4 - name: Setup Python uses: ./.github/actions/setup-python + - name: Test Django migrations work from blank slate + working-directory: engine + run: python manage.py migrate - name: Unit Test Backend working-directory: engine run: pytest -x @@ -259,6 +268,9 @@ jobs: uses: actions/checkout@v4 - name: Setup Python uses: ./.github/actions/setup-python + - name: Test Django migrations work from blank slate + working-directory: engine + run: python manage.py migrate - name: Unit Test Backend working-directory: engine run: pytest -x diff --git a/engine/apps/alerts/migrations/0070_remove_resolutionnoteslackmessage__slack_channel_id_db.py b/engine/apps/alerts/migrations/0070_remove_resolutionnoteslackmessage__slack_channel_id_db.py index 70355474d..f2eb3d5a3 100644 --- a/engine/apps/alerts/migrations/0070_remove_resolutionnoteslackmessage__slack_channel_id_db.py +++ b/engine/apps/alerts/migrations/0070_remove_resolutionnoteslackmessage__slack_channel_id_db.py @@ -1,7 +1,7 @@ # Generated by Django 4.2.16 on 2024-11-20 20:23 -import common.migrations.remove_field -import django_migration_linter as linter +# import common.migrations.remove_field +# import django_migration_linter as linter from django.db import migrations @@ -12,10 +12,14 @@ class Migration(migrations.Migration): ] operations = [ - linter.IgnoreMigration(), - common.migrations.remove_field.RemoveFieldDB( - model_name='resolutionnoteslackmessage', - name='_slack_channel_id', - remove_state_migration=('alerts', '0068_remove_resolutionnoteslackmessage__slack_channel_id_state'), - ), + # NOTE: commented out due to some issues this was causing w/ SQLite: + # https://github.com/grafana/oncall/issues/5306 + # https://github.com/grafana/oncall/issues/5244#issuecomment-2503999986 + # + # linter.IgnoreMigration(), + # common.migrations.remove_field.RemoveFieldDB( + # model_name='resolutionnoteslackmessage', + # name='_slack_channel_id', + # remove_state_migration=('alerts', '0068_remove_resolutionnoteslackmessage__slack_channel_id_state'), + # ), ]