oncall-engine/engine
Joey Orlando e115617528
chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330)
# What this PR does

- Stops writing `SlackMessage.organization` + removes references to this
field. [As we
discussed](https://raintank-corp.slack.com/archives/C083TU81TCH/p1733315887463279?thread_ts=1733311105.095309&cid=C083TU81TCH),
we do not need this field on this model/table,
`SlackMessage._slack_team_identity` is sufficient (`organization` will
be dropped in a separate PR)
- Adds a data migration script which:
- drops orphaned `SlackMessage` records; ie. ones which, even after the
[`engine/apps/slack/migrations/0007_migrate_slackmessage_channel_id.py`](https://github.com/grafana/oncall/blob/dev/engine/apps/slack/migrations/0007_migrate_slackmessage_channel_id.py)
migration, still don't have a `SlackMessage.channel` id filled in (we
discussed + agreed on dropping these records
[here](https://raintank-corp.slack.com/archives/C083TU81TCH/p1733329914516859?thread_ts=1733311105.095309&cid=C083TU81TCH))
- fills in empty `SlackMessage.slack_team_identity` values (from
`slack_message.channel.slack_team_identity`)

### Other notes

On the `organization` topic.

We store records in `SlackMessage` for two purposes (AFAICT), and in
both cases, we have references back to the `organization`:
- alert groups - `slack_message.alert_group.channel.organization`
- shift swap requests - `shift_swap_request.schedule.organization`

## 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.
2024-12-06 11:43:40 -05:00
..
apps chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
common feat: add timestamp_to_datetime jinja template filter (#5303) 2024-11-28 11:20:21 +00:00
config_integrations Remove AM status from title (#5261) 2024-11-22 03:45:03 +00:00
engine chore: remove references to SlackMessage._channel_id (#5325) 2024-12-06 09:28:26 -05:00
settings chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
static/images Update resolution note message shortcut instruction (#4482) 2024-06-07 13:54:45 +00:00
type_stubs/icalendar continue addressing mypy violations (#2170) 2023-06-27 10:23:08 +00:00
.dockerignore One startup command to rule them all (#760) 2022-11-07 16:34:43 +01:00
.gitignore modify push notification settings + use fcm-django library (#998) 2022-12-20 12:41:34 +01:00
celery_with_exporter.sh Add flag to debug logs (#912) 2022-11-29 11:16:42 +08:00
conftest.py chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
Dockerfile Bump base image version (#5033) 2024-09-17 23:19:43 +00:00
grpcio-1.64.1-cp312-cp312-linux_aarch64.whl bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
manage.py Instrument requests lib (#4008) 2024-03-05 05:22:34 +00:00
pyproject.toml Add doc references to regex_search jinja filter (#4973) 2024-09-04 17:47:09 +00:00
requirements-dev.in chore: add pytest-socket library + disable network calls in tests (#5315) 2024-12-02 10:53:18 -05:00
requirements-dev.txt chore: upgrade django to 4.2.17 (#5331) 2024-12-05 13:11:07 +00:00
requirements.in chore: upgrade django to 4.2.17 (#5331) 2024-12-05 13:11:07 +00:00
requirements.txt chore: upgrade django to 4.2.17 (#5331) 2024-12-05 13:11:07 +00:00
tox.ini Inbound email additional logging (#5335) 2024-12-06 11:56:37 +00:00
uwsgi.ini Remove explicit request size limits (#3878) 2024-02-22 15:00:33 +00:00
wait_for_test_mysql_start.sh Revert "Revert "speed up ci builds from 15 to <7 minutes"" (#1643) 2023-03-28 09:34:03 +02:00