From b12708d7dbc69dd3cfb587171f9e57c2ba04d75b Mon Sep 17 00:00:00 2001 From: Sergey Kolesnik Date: Wed, 20 Nov 2024 20:04:14 +0300 Subject: [PATCH 1/5] security: Update docker redis image to v7.0.15 (#5063) # What this PR does Updating docker image for Redis to latest version on 7.0 branch ## Which issue(s) this PR closes * (CVE-2022-35977) Integer overflow in the Redis SETRANGE and SORT/SORT_RO commands can drive Redis to OOM panic * (CVE-2023-22458) Integer overflow in the Redis HRANDFIELD and ZRANDMEMBER commands can lead to denial-of-service * (CVE-2023-25155) Specially crafted SRANDMEMBER, ZRANDMEMBER, and HRANDFIELD commands can trigger an integer overflow, resulting in a runtime assertion and termination of the Redis server process. * (CVE-2022-36021) String matching commands (like SCAN or KEYS) with a specially crafted pattern to trigger a denial-of-service attack on Redis, causing it to hang and consume 100% CPU time. * (CVE-2023-28425) Specially crafted MSETNX command can lead to assertion and denial-of-service * (CVE-2023-28856) Authenticated users can use the HINCRBYFLOAT command to create an invalid hash field that will crash Redis on access * (CVE-2022-24834) A specially crafted Lua script executing in Redis can trigger a heap overflow in the cjson and cmsgpack libraries, and result in heap corruption and potentially remote code execution. The problem exists in all versions of Redis with Lua scripting support, starting from 2.6, and affects only authenticated and authorized users. * (CVE-2023-36824) Extracting key names from a command and a list of arguments may, in some cases, trigger a heap overflow and result in reading random heap memory, heap corruption and potentially remote code execution. Specifically: using COMMAND GETKEYS* and validation of key names in ACL rules. * (CVE-2023-41053) Redis does not correctly identify keys accessed by SORT_RO and as a result may grant users executing this command access to keys that are not explicitly authorized by the ACL configuration. * (CVE-2023-45145) The wrong order of listen(2) and chmod(2) calls creates a race condition that can be used by another process to bypass desired Unix socket permissions on startup. * (CVE-2023-41056) In some cases, Redis may incorrectly handle resizing of memory buffers which can result in incorrect accounting of buffer sizes and lead to heap overflow and potential remote code execution. ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- .github/workflows/linting-and-tests.yml | 2 +- docker-compose-developer.yml | 2 +- docker-compose-mysql-rabbitmq.yml | 2 +- docker-compose.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting-and-tests.yml b/.github/workflows/linting-and-tests.yml index 23688595e6..504363baa3 100644 --- a/.github/workflows/linting-and-tests.yml +++ b/.github/workflows/linting-and-tests.yml @@ -193,7 +193,7 @@ jobs: ONCALL_TESTING_RBAC_ENABLED: ${{ matrix.rbac_enabled }} services: redis_test: - image: redis:7.0.5 + image: redis:7.0.15 ports: - 6379:6379 options: >- diff --git a/docker-compose-developer.yml b/docker-compose-developer.yml index ee668df794..7b4143f260 100644 --- a/docker-compose-developer.yml +++ b/docker-compose-developer.yml @@ -172,7 +172,7 @@ services: redis: container_name: redis labels: *oncall-labels - image: redis:7.0.5 + image: redis:7.0.15 restart: always ports: - "6379:6379" diff --git a/docker-compose-mysql-rabbitmq.yml b/docker-compose-mysql-rabbitmq.yml index 60b320e80f..a00d701672 100644 --- a/docker-compose-mysql-rabbitmq.yml +++ b/docker-compose-mysql-rabbitmq.yml @@ -87,7 +87,7 @@ services: retries: 10 redis: - image: redis:7.0.5 + image: redis:7.0.15 restart: always expose: - 6379 diff --git a/docker-compose.yml b/docker-compose.yml index c54c2fb33f..0d687d4e99 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,7 +54,7 @@ services: condition: service_healthy redis: - image: redis:7.0.5 + image: redis:7.0.15 restart: always expose: - 6379 From 4afba220ea2be36b1d5737fffc0f30b4f7457c57 Mon Sep 17 00:00:00 2001 From: Zachary Sistrunk Date: Wed, 20 Nov 2024 11:04:25 -0600 Subject: [PATCH 2/5] Fix issue with DST starting/ending causing overlaps/gaps (#5266) # What this PR does This older version of recurring_ical_events does not call the pytz .normalize() function, which can cause some invalid datetime objects to return when a DST swap happens. For example: Nov 3, 2024 9:00 AM CDT instead of the correct 8:00 AM CST). By calling tz.normalize on the end date and checking if the time zone information changed, we can detect when DST starts/stops and adjust the end date accordingly. | | DST stopping on November 3, 2024: | DST starting on March 9, 2024 | |-|-----------------------------------------|-----------------------------------| | Before | ![image](https://github.com/user-attachments/assets/933bce80-9b6a-475b-88f2-6356d0e3a6fd) | ![image](https://github.com/user-attachments/assets/264b816f-6f40-4f14-bbc0-1d03f7b74ac4) | After | ![image](https://github.com/user-attachments/assets/fbd71991-c4f8-4685-a527-6dbb147b2cb6) | ![image](https://github.com/user-attachments/assets/ccd932df-2ab4-4472-bc90-045372712f75) | ## Which issue(s) this PR closes Closes #5247 ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --------- Co-authored-by: Matias Bordese --- .../amixr_recurring_ical_events_adapter.py | 13 +++++ .../schedules/tests/test_on_call_schedule.py | 57 +++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/engine/apps/schedules/ical_events/adapter/amixr_recurring_ical_events_adapter.py b/engine/apps/schedules/ical_events/adapter/amixr_recurring_ical_events_adapter.py index 155a6161b2..fa0dc3fff4 100644 --- a/engine/apps/schedules/ical_events/adapter/amixr_recurring_ical_events_adapter.py +++ b/engine/apps/schedules/ical_events/adapter/amixr_recurring_ical_events_adapter.py @@ -20,6 +20,15 @@ class AmixrRecurringIcalEventsAdapter(IcalService): + def _normalize(self, dt: datetime.datetime) -> datetime.datetime: + tz = getattr(dt, "tzinfo", None) + if tz: + normalized = tz.normalize(dt) + if normalized.tzinfo != tz: + diff = dt.dst() - normalized.dst() + dt = normalized + diff + return dt + def get_events_from_ical_between( self, calendar: Calendar, start_date: datetime.datetime, end_date: datetime.datetime ) -> typing.List[Event]: @@ -38,6 +47,10 @@ def get_events_from_ical_between( end_date + datetime.timedelta(days=EXTRA_LOOKUP_DAYS), ) + for event in events: + # account for timezones not being properly calculated when DST changes. + event[ICAL_DATETIME_END].dt = self._normalize(event[ICAL_DATETIME_END].dt) + def filter_extra_days(event): event_start, event_end = self.get_start_and_end_with_respect_to_event_type(event) if event_start > event_end: diff --git a/engine/apps/schedules/tests/test_on_call_schedule.py b/engine/apps/schedules/tests/test_on_call_schedule.py index e63c96b2f8..71a029b468 100644 --- a/engine/apps/schedules/tests/test_on_call_schedule.py +++ b/engine/apps/schedules/tests/test_on_call_schedule.py @@ -1818,6 +1818,63 @@ def test_refresh_ical_final_schedule_ok( assert event in expected_events +@pytest.mark.django_db +def test_filter_events_during_dst_change( + make_organization, + make_user_for_organization, + make_schedule, + make_on_call_shift, +): + organization = make_organization() + u1 = make_user_for_organization(organization) + + schedule = make_schedule( + organization, + time_zone="America/Chicago", # UTC-6 or UTC-5 depending on DST + schedule_class=OnCallScheduleCalendar, + ) + start_datetime = timezone.datetime(2024, 10, 1, 0, 0, 0, tzinfo=timezone.utc) + duration = timezone.timedelta(seconds=60 * 60 * 24 * 7) # 1 week + data = { + "start": start_datetime, + "rotation_start": start_datetime, + "duration": duration, + "frequency": CustomOnCallShift.FREQUENCY_WEEKLY, + "week_start": CustomOnCallShift.MONDAY, + } + on_call_shift = make_on_call_shift( + organization=organization, shift_type=CustomOnCallShift.TYPE_ROLLING_USERS_EVENT, **data + ) + on_call_shift.add_rolling_users([[u1]]) + schedule.custom_on_call_shifts.add(on_call_shift) + + schedule.refresh_ical_file() + + # week with DST change + start_date = timezone.datetime(2024, 11, 4, 0, 0, 0, tzinfo=timezone.utc) + end_date = start_date + timezone.timedelta(days=1) + events = schedule.filter_events(start_date, end_date) + expected = { + "start": timezone.datetime(2024, 10, 29, 5, 0, 0, tzinfo=timezone.utc), + "end": timezone.datetime(2024, 11, 5, 6, 0, 0, tzinfo=timezone.utc), + } + assert len(events) == 1 + returned = {"start": events[0]["start"], "end": events[0]["end"]} + assert returned == expected + + # week with DST change back + start_date = timezone.datetime(2025, 3, 10, 0, 0, 0, tzinfo=timezone.utc) + end_date = start_date + timezone.timedelta(days=1) + events = schedule.filter_events(start_date, end_date) + expected = { + "start": timezone.datetime(2025, 3, 4, 6, 0, 0, tzinfo=timezone.utc), + "end": timezone.datetime(2025, 3, 11, 5, 0, 0, tzinfo=timezone.utc), + } + assert len(events) == 1 + returned = {"start": events[0]["start"], "end": events[0]["end"]} + assert returned == expected + + @pytest.mark.django_db def test_refresh_ical_final_schedule_cancel_deleted_events( make_organization, From 757f0d1ce0e5790679bb14ced2946b4956396527 Mon Sep 17 00:00:00 2001 From: Michael Derynck Date: Wed, 20 Nov 2024 10:14:14 -0700 Subject: [PATCH 3/5] fix: remove notification failure policy log record when prevent posting is set (#5260) # What this PR does Changes UserNotificationPolicyLogRecord to success when slack_prevent_posting is set as the user has already been notified in slack or another method in their personal notification preferences. These entries have also been filtered out of the alert group history timeline as they were causing confusion to users thinking notifications failed when in fact they had already been sent. ## Which issue(s) this PR closes https://github.com/grafana/support-escalations/issues/13236 ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- .../alerts/incident_log_builder/incident_log_builder.py | 9 +++++++++ engine/apps/alerts/tasks/notify_user.py | 2 +- engine/apps/alerts/tests/test_notify_user.py | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/engine/apps/alerts/incident_log_builder/incident_log_builder.py b/engine/apps/alerts/incident_log_builder/incident_log_builder.py index 9fb1f0021c..d291d4fade 100644 --- a/engine/apps/alerts/incident_log_builder/incident_log_builder.py +++ b/engine/apps/alerts/incident_log_builder/incident_log_builder.py @@ -152,6 +152,15 @@ def _get_user_notification_log_records_for_log_report(self) -> "RelatedManager[' Q(type=UserNotificationPolicyLogRecord.TYPE_PERSONAL_NOTIFICATION_TRIGGERED) & Q(notification_policy__step=UserNotificationPolicy.Step.WAIT) ) + # Exclude SUCCESS + ERROR_NOTIFICATION_POSTING_TO_SLACK_IS_DISABLED, these cause confusions as the user + # has already been notified by another path so this step should not be displayed, although it is kept + # for auditing. + | Q( + Q(type=UserNotificationPolicyLogRecord.TYPE_PERSONAL_NOTIFICATION_SUCCESS) + & Q( + notification_error_code=UserNotificationPolicyLogRecord.ERROR_NOTIFICATION_POSTING_TO_SLACK_IS_DISABLED + ) + ) ) .select_related("author") .distinct() diff --git a/engine/apps/alerts/tasks/notify_user.py b/engine/apps/alerts/tasks/notify_user.py index 88f46f6e9c..2cc8b89e91 100644 --- a/engine/apps/alerts/tasks/notify_user.py +++ b/engine/apps/alerts/tasks/notify_user.py @@ -528,7 +528,7 @@ def perform_notification(log_record_pk, use_default_notification_policy_fallback ) UserNotificationPolicyLogRecord( author=user, - type=UserNotificationPolicyLogRecord.TYPE_PERSONAL_NOTIFICATION_FAILED, + type=UserNotificationPolicyLogRecord.TYPE_PERSONAL_NOTIFICATION_SUCCESS, notification_policy=notification_policy, reason="Prevented from posting in Slack", alert_group=alert_group, diff --git a/engine/apps/alerts/tests/test_notify_user.py b/engine/apps/alerts/tests/test_notify_user.py index a24003dfe9..2b885cedbe 100644 --- a/engine/apps/alerts/tests/test_notify_user.py +++ b/engine/apps/alerts/tests/test_notify_user.py @@ -315,7 +315,7 @@ def test_perform_notification_slack_prevent_posting( mocked_send_slack_notification.assert_not_called() last_log_record = UserNotificationPolicyLogRecord.objects.last() - assert last_log_record.type == UserNotificationPolicyLogRecord.TYPE_PERSONAL_NOTIFICATION_FAILED + assert last_log_record.type == UserNotificationPolicyLogRecord.TYPE_PERSONAL_NOTIFICATION_SUCCESS assert last_log_record.reason == "Prevented from posting in Slack" assert ( last_log_record.notification_error_code From 633476365af46704ccf5060eb677f276a8e28492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:47:55 +0000 Subject: [PATCH 4/5] chore(deps): bump aiohttp from 3.10.2 to 3.10.11 in /dev/scripts/generate-fake-data (#5275) [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aiohttp&package-manager=pip&previous-version=3.10.2&new-version=3.10.11)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/grafana/oncall/network/alerts).
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Joey Orlando --- dev/scripts/generate-fake-data/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/scripts/generate-fake-data/requirements.txt b/dev/scripts/generate-fake-data/requirements.txt index 74976b8c29..29b74d6b8a 100644 --- a/dev/scripts/generate-fake-data/requirements.txt +++ b/dev/scripts/generate-fake-data/requirements.txt @@ -1,3 +1,3 @@ -aiohttp==3.10.2 +aiohttp==3.10.11 Faker==16.4.0 tqdm==4.66.3 From dd65732b99421fe74801c59397d3134ae1c03fdd Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Wed, 20 Nov 2024 17:02:05 -0500 Subject: [PATCH 5/5] chore: patch recent migration files that drop db columns (#5277) # What this PR does - patch recent migration files which drop several deprecated DB columns which led to a recent (minor/internal) issue - add a CI job to prevent this from happening in the future and instead, force folks to drop columns [the _proper_ way](https://github.com/grafana/oncall/tree/dev/dev#removing-a-nullable-field-from-a-model) (which we have documented internally) (as documented [here](https://github.com/grafana/oncall/tree/dev/dev#removing-a-nullable-field-from-a-model), I have the four additional migration files (which actually do the `DROP COLUMN`s in the db) saved locally, and will include these in a separate PR/release) ## Checklist - [x] Unit, integration, and e2e (if applicable) tests updated - [x] Documentation added (or `pr:no public docs` PR label added if not required) - [x] Added the relevant release notes label (see labels prefixed w/ `release:`). These labels dictate how your PR will show up in the autogenerated release notes. --- .github/workflows/linting-and-tests.yml | 53 +++++++++++++++++++ ...hannelfilter__slack_channel_id_and_more.py | 8 --- ...e_channelfilter__slack_channel_id_state.py | 18 +++++++ ...oteslackmessage__slack_channel_id_state.py | 18 +++++++ ...20_remove_oncallschedule_channel_state.py} | 7 ++- ...anization_general_log_channel_id_state.py} | 7 ++- 6 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 engine/apps/alerts/migrations/0067_remove_channelfilter__slack_channel_id_state.py create mode 100644 engine/apps/alerts/migrations/0068_remove_resolutionnoteslackmessage__slack_channel_id_state.py rename engine/apps/schedules/migrations/{0020_remove_oncallschedule_channel.py => 0020_remove_oncallschedule_channel_state.py} (62%) rename engine/apps/user_management/migrations/{0028_remove_organization_general_log_channel_id.py => 0028_remove_organization_general_log_channel_id_state.py} (63%) diff --git a/.github/workflows/linting-and-tests.yml b/.github/workflows/linting-and-tests.yml index 504363baa3..d94506638b 100644 --- a/.github/workflows/linting-and-tests.yml +++ b/.github/workflows/linting-and-tests.yml @@ -85,6 +85,59 @@ jobs: python manage.py makemigrations --check python manage.py lintmigrations + # the following CI check is to prevent developers from dropping columns in a way that could cause downtime + # (the proper way to drop columns is documented in dev/README.md) + # + # we've been bitten by this before (see https://raintank-corp.slack.com/archives/C081TNWM73N as an example) + ensure-database-migrations-drop-columns-the-correct-way: + name: "Ensure database migrations drop columns the correct way" + runs-on: ubuntu-latest + steps: + - name: Checkout PR code + uses: actions/checkout@v3 + with: + # Fetch all history so we can compare with the base branch + fetch-depth: 0 + # Checkout the head commit of the PR + ref: ${{ github.event.pull_request.head.sha }} + + - name: Fetch base branch + run: git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }} + + - name: Check for RemoveField in Migrations + # yamllint disable rule:line-length + run: | + # Get the list of files changed in the PR + git diff --name-only ${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }} > changed_files.txt + + # Filter for migration files + grep -E '^.*/migrations/.*\.py$' changed_files.txt > migration_files.txt || true + + # Initialize a flag + FAILED=0 + + # Check each migration file for 'migrations.RemoveField' + if [ -s migration_files.txt ]; then + while IFS= read -r file; do + echo "Checking $file for migrations.RemoveField..." + if grep -q 'migrations.RemoveField' "$file"; then + echo "❌ Error: Found migrations.RemoveField in $file" + FAILED=1 + else + echo "✅ No RemoveField found in $file" + fi + done < migration_files.txt + else + echo "No migration files changed." + fi + + # Fail the job if RemoveField was found + if [ "$FAILED" -eq 1 ]; then + echo "❌ Error: Found migrations.RemoveField in one or more migration files. Please check out our documentation at https://github.com/grafana/oncall/tree/dev/dev#removing-a-nullable-field-from-a-model on how to properly drop columns." + exit 1 + fi + # yamllint enable rule:line-length + unit-test-helm-chart: name: "Helm Chart Unit Tests" runs-on: ubuntu-latest-16-cores diff --git a/engine/apps/alerts/migrations/0066_remove_channelfilter__slack_channel_id_and_more.py b/engine/apps/alerts/migrations/0066_remove_channelfilter__slack_channel_id_and_more.py index 03c5f53430..7c23e789e2 100644 --- a/engine/apps/alerts/migrations/0066_remove_channelfilter__slack_channel_id_and_more.py +++ b/engine/apps/alerts/migrations/0066_remove_channelfilter__slack_channel_id_and_more.py @@ -12,14 +12,6 @@ class Migration(migrations.Migration): operations = [ linter.IgnoreMigration(), - migrations.RemoveField( - model_name='channelfilter', - name='_slack_channel_id', - ), - migrations.RemoveField( - model_name='resolutionnoteslackmessage', - name='_slack_channel_id', - ), migrations.DeleteModel( name='AlertGroupPostmortem', ), diff --git a/engine/apps/alerts/migrations/0067_remove_channelfilter__slack_channel_id_state.py b/engine/apps/alerts/migrations/0067_remove_channelfilter__slack_channel_id_state.py new file mode 100644 index 0000000000..b819201d0c --- /dev/null +++ b/engine/apps/alerts/migrations/0067_remove_channelfilter__slack_channel_id_state.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.16 on 2024-11-20 20:21 + +import common.migrations.remove_field +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('alerts', '0066_remove_channelfilter__slack_channel_id_and_more'), + ] + + operations = [ + common.migrations.remove_field.RemoveFieldState( + model_name='channelfilter', + name='_slack_channel_id', + ), + ] diff --git a/engine/apps/alerts/migrations/0068_remove_resolutionnoteslackmessage__slack_channel_id_state.py b/engine/apps/alerts/migrations/0068_remove_resolutionnoteslackmessage__slack_channel_id_state.py new file mode 100644 index 0000000000..a270331c73 --- /dev/null +++ b/engine/apps/alerts/migrations/0068_remove_resolutionnoteslackmessage__slack_channel_id_state.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.16 on 2024-11-20 20:23 + +import common.migrations.remove_field +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('alerts', '0067_remove_channelfilter__slack_channel_id_state'), + ] + + operations = [ + common.migrations.remove_field.RemoveFieldState( + model_name='resolutionnoteslackmessage', + name='_slack_channel_id', + ), + ] diff --git a/engine/apps/schedules/migrations/0020_remove_oncallschedule_channel.py b/engine/apps/schedules/migrations/0020_remove_oncallschedule_channel_state.py similarity index 62% rename from engine/apps/schedules/migrations/0020_remove_oncallschedule_channel.py rename to engine/apps/schedules/migrations/0020_remove_oncallschedule_channel_state.py index e4d1913827..23e3f96f6b 100644 --- a/engine/apps/schedules/migrations/0020_remove_oncallschedule_channel.py +++ b/engine/apps/schedules/migrations/0020_remove_oncallschedule_channel_state.py @@ -1,7 +1,7 @@ -# Generated by Django 4.2.16 on 2024-11-06 21:13 +# Generated by Django 4.2.16 on 2024-11-20 20:12 +import common.migrations.remove_field from django.db import migrations -import django_migration_linter as linter class Migration(migrations.Migration): @@ -11,8 +11,7 @@ class Migration(migrations.Migration): ] operations = [ - linter.IgnoreMigration(), - migrations.RemoveField( + common.migrations.remove_field.RemoveFieldState( model_name='oncallschedule', name='channel', ), diff --git a/engine/apps/user_management/migrations/0028_remove_organization_general_log_channel_id.py b/engine/apps/user_management/migrations/0028_remove_organization_general_log_channel_id_state.py similarity index 63% rename from engine/apps/user_management/migrations/0028_remove_organization_general_log_channel_id.py rename to engine/apps/user_management/migrations/0028_remove_organization_general_log_channel_id_state.py index 6d415bdb44..4e5d61ebe1 100644 --- a/engine/apps/user_management/migrations/0028_remove_organization_general_log_channel_id.py +++ b/engine/apps/user_management/migrations/0028_remove_organization_general_log_channel_id_state.py @@ -1,7 +1,7 @@ -# Generated by Django 4.2.16 on 2024-11-06 21:11 +# Generated by Django 4.2.16 on 2024-11-20 17:58 +import common.migrations.remove_field from django.db import migrations -import django_migration_linter as linter class Migration(migrations.Migration): @@ -11,8 +11,7 @@ class Migration(migrations.Migration): ] operations = [ - linter.IgnoreMigration(), - migrations.RemoveField( + common.migrations.remove_field.RemoveFieldState( model_name='organization', name='general_log_channel_id', ),