oncall-engine/engine/apps
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
..
alerts chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
api Fix test connection on integration create (#5328) 2024-12-05 16:46:37 +00:00
api_for_grafana_incident Allow valid URLs for web image_url template (#5150) 2024-10-10 13:21:36 +00:00
auth_token chore: add pytest-socket library + disable network calls in tests (#5315) 2024-12-02 10:53:18 -05:00
base Reschedule rate limited telegram task instead of retry (#5178) 2024-10-15 13:35:54 +00:00
chatops_proxy update URLs constructed by the backend to support IRM plugin (#5137) 2024-10-09 08:55:10 -04:00
email Inbound email additional logging (#5335) 2024-12-06 11:56:37 +00:00
exotel Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
google feat: convert schedule.channel (char field) to schedule.slack_channel (foreign key) (#5199) 2024-11-04 14:27:21 -05:00
grafana_plugin chore: add pytest-socket library + disable network calls in tests (#5315) 2024-12-02 10:53:18 -05:00
heartbeat chore: remove deprecated slack_channel and heartbeat integration types (#5270) 2024-11-20 11:17:04 -05:00
integrations chore: remove deprecated slack_channel and heartbeat integration types (#5270) 2024-11-20 11:17:04 -05:00
labels Merge alert group static labels to integration labels (#5262) 2024-11-28 15:44:51 +00:00
metrics_exporter Split up organizations across metrics exporters (#5127) 2024-10-08 17:29:36 +00:00
mobile_app fix: mobile app template preview use dynamic value (#5311) 2024-11-28 21:11:00 +00:00
oss_installation feat: update RBAC permissioning to support grafana-irm-app (#5149) 2024-10-10 19:02:21 +00:00
phone_notifications Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
public_api chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
schedules chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
slack chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
social_auth SocialAuthAuthCanceledExceptionMiddleware should only process social … (#5221) 2024-11-04 04:54:47 +00:00
telegram Fix acknowledge reminder task (#5179) 2024-10-16 12:13:28 +00:00
twilioapp Listen for alert group actions during whole notification call (#5282) 2024-11-22 04:34:40 +00:00
user_management chore: drop usage of SlackMessage.organization + drop orphaned SlackMessages (#5330) 2024-12-06 11:43:40 -05:00
webhooks Add manual trigger support for webhooks (#4934) 2024-09-09 12:17:23 +00:00
zvonok Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00