-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Drop public channel requirement for slack images #54276
Conversation
fef2f7c
to
1e1a12a
Compare
|
2773f32
to
a974236
Compare
a974236
to
faffe90
Compare
Testing and I get this error: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Devils advocating here, but can you imagine any customers being upset at losing the image firehose? Can't imagine a user wanting to be in that channel, but perhaps being used for automation or something.
So I've added the But I have another issue with sending a big dashboard with 34 cards: For your info, I use the example dashboards at I think we need to find a way around this, otherwise this will break some existing integration. |
… files channel This removes the requirement to have a public files channel so share images or other files in slack bot posts. Simplifying the integration and lessening requirements to get setup. It enables the posting of images files directly to public or private channels without sharing - improving privacy and security.
080868c
to
962d55a
Compare
962d55a
to
b287dbb
Compare
There was an accidental introduction of files.read. The goal is to preserve the previous behaviour of reusing completeUploadExternal. This limits the oauth scope requirements of the bot token.
b287dbb
to
c2a8623
Compare
c2a8623
to
07a2bcc
Compare
- Its easy to mapv - (cond) over nested (if)s - Fix out of date docstring
I mean, yes - I can imagine it. I think we win on balance? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nicely done!
no scope changes, get passed the block limit.
I do find a mention of slack-channel in docs/configuring-metabase/config-template.md
which I think you need to remove.
other than that this looks great to me.
Side note: I think we need to mention in the release note that we'll no longer update images to a channel in case people rely on these.
* Prefer slack_file for images, so metabase no longer requires a public files channel This removes the requirement to have a public files channel so share images or other files in slack bot posts. Simplifying the integration and lessening requirements to get setup. It enables the posting of images files directly to public or private channels without sharing - improving privacy and security. * Files channel deprecation note * Drop slack-files-channel requirement from slack /settings API * Remove remaining files-channel calls * Remove files channel input from SlackSetupForm * Remove slack-files-channel from SettingsManagerSettings * Remove slack-files-channel from API docs * Drop files channel configuration guidance * Remove slack channel prompt/description * Instead of polling files.read reuse the complete call There was an accidental introduction of files.read. The goal is to preserve the previous behaviour of reusing completeUploadExternal. This limits the oauth scope requirements of the bot token. * If more than 50 slack blocks, send using multiple messages * Escape mkdwn special-processing chars in card links * Simplify slack attachment uploading - Its easy to mapv - (cond) over nested (if)s - Fix out of date docstring * Remove slack-files-channel from config-template.md * Remove metabase_files check from e2e suite
Previously, before a file could be embedded in a bot post (e.g. images in a dashboard subscription post), it first had to be uploaded to the slack-files-channel. This PR makes it so that the slack-files-channel is no longer necessary, and images can be embedded directly in posts without additional ceremony.
When setting up the slack integration, users no longer need to specify a files channel name. They now only need provide the oauth token.
To be clear, if this PR is merged we will no longer post images to the configured files channel - so if users somehow depend on that (not only the dashboard/alert posts themselves, but the file post) then we might break them. On balance I consider this unlikely enough that the additional complexity required to support any such use cases would not be worth it.
This has a few advantages:
e.g say you had a dashboard of employee stats, salary, sick days etc - you might hesitate setting up a subscription because all your slack users would be able to see the dashboard images.
Closes #53319
Closes WRK-59
Description
This is made possible by dropping the legacy slack 'attachment' used for images, and instead utilising the blockkit
image
element, which permits sending private files directly using theslack_file
field.For large dashboards, more than one slack post will be made per notification, to work around block limits (50 per message).
How to verify
Describe the steps to verify that the changes are working as expected.
Setup a new slack integration
Create a dashboard
Test a subscription
Observe the post in slack, image is shared directly without posting to a files channel
Checklist