oncall-engine/engine
Joey Orlando 3fd9a73a52
GCal autogenerated shift swap requests - don't recreate if one was previously created and deleted (#4281)
# What this PR does

Addresses two issues:
- addresses an internal feature request ([in
Slack](https://raintank-corp.slack.com/archives/C03KS498VGV/p1713550543916289?thread_ts=1713546008.831749&cid=C03KS498VGV))
to not have a new shift swap request auto-generated if one previously
was, but than the user decided to delete that SSR
- when disconnecting the GCal integration from your user, I've seen
cases where Google will return HTTP 400 as such ([example
logs](https://ops.grafana-ops.net/goto/8vX76pBSg?orgId=1)):
  ```
{'error': 'invalid_token', 'error_description': 'Token expired or
revoked'}
  ```
I can't seem to find detailed documentation on the revoke endpoint (`GET
https://accounts.google.com/o/oauth2/revoke?token=<token>`) to try and
better understand the possible `error` values.. but I think our best bet
here is to just continue forward w/
`user.finish_google_oauth2_disconnection_flow()` (which deletes the
`GoogleOAuth2User` associated with the user and sets
`user.google_calendar_settings = None`)

## 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-04-25 18:16:42 +00:00
..
apps GCal autogenerated shift swap requests - don't recreate if one was previously created and deleted (#4281) 2024-04-25 18:16:42 +00:00
common update mobile app proxy's usage of the Cloud Auth API (#4194) 2024-04-11 14:45:21 +00:00
config_integrations Fix docs and UI for connecting Grafana Alerting from other stack (#4243) 2024-04-24 08:02:51 +00:00
engine Improve performance for deleted integration lookups (#4163) 2024-04-05 16:16:30 +00:00
settings Fix docs and UI for connecting Grafana Alerting from other stack (#4243) 2024-04-24 08:02:51 +00:00
static/images remove django admin panel (#2731) 2023-08-02 14:26:50 -04: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 Allow webhook modification by API for advanced webhook (#4175) 2024-04-23 19:18:12 +00:00
Dockerfile Use local arm64 grpcio wheel to make local builds on arm64 faster (#4000) 2024-03-05 06:31:58 +00:00
grpcio-1.57.0-cp311-cp311-linux_aarch64.whl Use local arm64 grpcio wheel to make local builds on arm64 faster (#4000) 2024-03-05 06:31:58 +00:00
manage.py Instrument requests lib (#4008) 2024-03-05 05:22:34 +00:00
pyproject.toml Google OAuth2 flow + fetch Google Calendar OOO events (#4067) 2024-04-02 14:59:03 -04:00
requirements-dev.in Use pip-tools to handle Python deps (#3892) 2024-02-20 17:44:15 +00:00
requirements-dev.txt Bump django from 4.2.10 to 4.2.11 in /engine (#4079) 2024-03-19 21:14:44 +00:00
requirements.in Bump social-auth-app-django from 5.3.0 to 5.4.1 in /engine (#4274) 2024-04-24 19:45:48 +00:00
requirements.txt Bump social-auth-app-django from 5.3.0 to 5.4.1 in /engine (#4274) 2024-04-24 19:45:48 +00:00
tox.ini Update xdist load to use loadscope setting (#4187) 2024-04-08 19:03:58 +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