Commit graph

6 commits

Author SHA1 Message Date
Innokentii Konstantinov
dd84aa15c6
Add missing app_type argument to uninstall request (#4700) 2024-07-18 05:14:52 +00:00
Vadim Stepanov
25031b3463
Tweak chatops-proxy sync (#4627)
# What this PR does

Fix for
https://raintank-corp.slack.com/archives/C04JCU51NF8/p1719452618841629.
* Move chatops-proxy sync tasks to the long queue
* Batch tasks slower (12 hours instead of 30 minutes)

<!--
*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-07-08 15:33:58 +00:00
Innokentii Konstantinov
48b7eca26d
Peridic chatops proxy sync (#4565)
Adds a pediodic job to sync tenants with chatops-proxy. Register request
will behave as upsert, allowing us to backfill new tenant's columns:
stack_id and stack_slug. Upsert is not merged on chatops-proxy, so
that's why task handling 409 status on /tenants/register request.
On top of that, I did small refactoring and introduced a new
register_oncall_tenant func, which receives org as an argument to not to
write `register_tenant(org.uuid, org.stack_id, org.stack_slug,.....)`
every time.
Part of https://github.com/grafana/oncall-gateway/issues/247
Need to be merged after https://github.com/grafana/oncall/pull/4559.
2024-06-24 04:35:59 +00:00
Innokentii Konstantinov
bc6272744b
Post stack slug to chatops proxy (#4559)
# What this PR does
It's part of work on
https://github.com/grafana/oncall-gateway/issues/247. I added stack_slug
to call to the chatops-proxy tenant/register API.
On a side note I figured out that we didn't cleanup slack integration in
chatops-proxy, once it's uninstalled on OnCall side, so it's
[fixed](https://github.com/grafana/oncall/pull/4559/files#diff-1784f1d0d65fa477f4562e73aa23fe1c757b171f36e03f12600bdb021f121307R577)
as well.
Changes are validated locally.
2024-06-21 06:40:34 +00:00
Innokentii Konstantinov
6c63f53889
Handle slack uninstall event from chatops-proxy (#4510) 2024-06-14 07:46:14 +00:00
Innokentii Konstantinov
17f448c506
Prepare OnCall for Unified Slack App (#4232)
This PR does a bunch of changes to prepare OnCall for Unified Slack App:
1. Install Slack via Chatops-Proxy. This change contains two parts:
getting a Slack install link from chatops-proxy
([code](https://github.com/grafana/oncall/pull/4232/files#diff-437a77d49fc04b92d315651b3df5991000b1ab74cf60aabb21aa77cb2823bf52R46))
and receiving a "slack installed" event from chatops-proxy
([code](https://github.com/grafana/oncall/pull/4232/files#diff-976d106f0962be5c1de5e35582193f68435ed0c17f2defd6bd2857bf6e27f65d)).
Also it means that OnCall doesn't need to register slack_links anymore
when slack is connected/disconnected. These changes are behind
UNIFIED_SLACK_APP_ENABLED flag and should be no-op if flag is not
enabled.
2. Get rid of Multiregionatily restrictions - instrument all slack
interactions with a ProxyMeta - json data telling chatops-proxy where to
route the interaction. Note, that it doesn't apply for "Add to
resolution notes" message action - it will be handled differently in
following PR.
3. Move all chatops-proxy related stuff from common/oncall-gateway to
apps/chatops-proxy

Minor changes:
1. Remove usage of **CHATOPS_V3** flag. Chatops v3 is already released
(It's a refactoring from previous quarter)

---------

Co-authored-by: Vadim Stepanov <vadimkerr@gmail.com>
Co-authored-by: Rares Mardare <rares.mardare@grafana.com>
2024-06-03 09:07:10 +00:00