oncall-engine/engine/apps
Michael Derynck 33a0c15b75
Truncate slack block text so it is not rejected by slack API (#5121)
# What this PR does
Truncates text for slack message to avoid this error:
```
File "/usr/local/lib/python3.12/site-packages/slack_sdk/web/slack_response.py", line 199, in validate
    raise e.SlackApiError(message=msg, response=self)
slack_sdk.errors.SlackApiError: The request to the Slack API failed. (url: https://www.slack.com/api/chat.postMessage)
The server responded with: {'ok': False, 'error': 'invalid_blocks', 'errors': ['failed to match all allowed schemas [json-pointer:/blocks/0/text]', 'must be less than 3001 characters [json-pointer:/blocks/0/text/text]'], 'response_metadata': {'messages': ['[ERROR] failed to match all allowed schemas [json-pointer:/blocks/0/text]', '[ERROR] must be less than 3001 characters [json-pointer:/blocks/0/text/text]']}}
```

## Which issue(s) this PR closes

Related to [issue link here]

<!--
*Note*: If you want the issue to be auto-closed once the PR is merged,
change "Related to" to "Closes" in the line above.
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-10-03 18:45:23 +00:00
..
alerts Clean up reverted migration (#5119) 2024-10-03 16:51:40 +00:00
api Clean up reverted migration (#5119) 2024-10-03 16:51:40 +00:00
api_for_grafana_incident add labels in grafana-incident alertgroup endpoint (#4448) 2024-06-25 14:50:55 +00:00
auth_token Check for user.is_active during mobile app auth (#4990) 2024-09-06 12:25:23 +00:00
base Speed up internal api endpoints (#4830) 2024-08-15 14:20:55 +00:00
chatops_proxy Add stack_id to Tenant dataclass (#4864) 2024-08-20 11:24:53 +00:00
email Make cloud email domain configurable (#4982) 2024-09-04 14:46:52 +00:00
exotel Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
google address Google OAuth2 issues where user didn't grant us the https://www.googleapis.com/auth/calendar.events.readonly scope (#4802) 2024-08-14 18:02:34 -04:00
grafana_plugin fix: update internal labels endpoints to work with RBAC (#5099) 2024-10-02 17:39:49 +00:00
heartbeat Improve OpenAPI schema coverage (#3629) 2024-01-12 15:11:22 +00:00
integrations Use dataclass methods in custom ratelimits and fix tests (#5036) 2024-09-18 13:32:16 +00:00
labels fix: update internal labels endpoints to work with RBAC (#5099) 2024-10-02 17:39:49 +00:00
metrics_exporter Fix collecting metrics (#4822) 2024-08-14 13:53:43 +00:00
mobile_app Update schedule related users to use cached final representation (#5101) 2024-10-01 13:37:28 +00:00
oss_installation bump uwsgi to 2.0.26 + Python to 3.12.3 (#4495) 2024-06-10 15:33:37 -04:00
phone_notifications Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
public_api Revert declared incident model related changes (#5116) 2024-10-02 21:34:20 +00:00
schedules Update schedule related users to use cached final representation (#5101) 2024-10-01 13:37:28 +00:00
slack Truncate slack block text so it is not rejected by slack API (#5121) 2024-10-03 18:45:23 +00:00
social_auth address Google OAuth2 issues where user didn't grant us the https://www.googleapis.com/auth/calendar.events.readonly scope (#4802) 2024-08-14 18:02:34 -04:00
telegram Handle Slack invalid_auth error when posting alert group notification (#4970) 2024-09-02 16:37:27 +00:00
twilioapp Add method to send notification bundle by SMS (#4624) 2024-07-16 14:20:16 +00:00
user_management fix: address RBAC Admin issue (#5087) 2024-09-26 12:40:07 -04: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