Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make slack deploy diff work for longer diffs as well #6460

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

AmitPhulera
Copy link
Contributor

We sometimes do not receive diffs during deploy so they have to be manually copied. On looking I found out it is because of the 3000 character limit on the message. The fix that is made here is chunking the longer messages and sending as separate messages on slack

This is how the diffs will look like.

There was another approach that I experimented with, which was sending different blocks in the same message like this

In both the approaches the messages are getting truncated under See More. For the second approach the See More is hidden in the diff and hard to find. Although first approach is still not the best but it provides a good differentiation between the messages.

Environments Affected

Prod and India

We sometimes do not receive diffs during deploy so they have to be manually copied. On looking I found out it is because of the 3000 charachter limit on the message. The fix that is made here is chunking the longer messages and sending as seperate messages on slack
Copy link
Contributor

@snopoke snopoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option would be to send the diff as a file: https://api.slack.com/messaging/files#upload

@AmitPhulera
Copy link
Contributor Author

That could have been one of the approach but I was not sure if Slack would render markdown files in the same way it renders markdown messages.

@AmitPhulera AmitPhulera merged commit c9a7003 into master Jan 10, 2025
3 checks passed
@AmitPhulera AmitPhulera deleted the ap/fix-long-deploy-messages branch January 10, 2025 12:01
@millerdev
Copy link
Contributor

⭐ 🏆 ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants