oncall-engine/engine/engine
Michael Derynck f5855915a2
Improve performance for deleted integration lookups (#4163)
# What this PR does
- Refactor alert receive channel lookup so it is easier to follow
- Remove the additional lookup that was taking place for alert receive
channels that belong to a deleted organization, these can be treated as
deleted for usage purposes even though the alert receive channel itself
does not have `deleted_at` populated
- Organizations that have been moved will still need to be looked up
everytime. This is not optimized in favor of not maintaining a cache of
Organizations. These are not frequent requests and can be optimized
later if necessary.

## Which issue(s) this PR closes

<!--
*Note*: if you have more than one GitHub issue that this PR closes, be
sure to preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## 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-05 16:16:30 +00:00
..
management/commands Add ability to migrate one org (#3809) 2024-02-01 18:25:36 +08:00
tests Improve performance for deleted integration lookups (#4163) 2024-04-05 16:16:30 +00:00
__init__.py World, meet OnCall! 2022-06-03 08:09:47 -06:00
celery.py Add trace_id to log lines (#3982) 2024-03-04 06:42:43 +00:00
included_path.py Add openapi schema generation for internal api (#2771) 2023-08-16 06:13:56 +00:00
integrations_urls.py Add settings to allow detaching integrations server (#3203) 2023-10-26 12:55:02 +00:00
middlewares.py Improve performance for rate-limited, banned and deleted integrations (#4137) 2024-04-04 18:05:34 +00:00
schema.py Improve OpenAPI schema coverage (#3629) 2024-01-12 15:11:22 +00:00
urls.py Another round of fixing chatops urls 2024-01-22 15:25:47 +08:00
views.py Improve performance for deleted integration lookups (#4163) 2024-04-05 16:16:30 +00:00
wsgi.py Instrument requests lib (#4008) 2024-03-05 05:22:34 +00:00