Conversation
745b75d to
d1bdaa5
Compare
cfbe2ec to
c156187
Compare
c156187 to
c2f6bf8
Compare
c2f6bf8 to
b1e31fd
Compare
026ac4c to
eccc201
Compare
1e048b2 to
a0ea944
Compare
a0ea944 to
22968c3
Compare
|
/testenv up |
|
@eschutho Ephemeral environment spinning up at http://35.87.151.148:8080. Credentials are |
|
/testenv up FEATURE_ALERT_REPORTS=true |
|
@eschutho Ephemeral environment spinning up at http://35.94.230.149:8080. Credentials are |
| search.lower() | ||
| for search in (search_string.split(",") if search_string else []) | ||
| ] | ||
| print(channels) |
There was a problem hiding this comment.
Did you want to print out channels?
a6bf324 to
1b98531
Compare
| for search in (search_string.split(",") if search_string else []) | ||
| ] | ||
|
|
||
| channels = [ |
There was a problem hiding this comment.
I'm just staring at this section of the code more and more, do we have good coverage for this function? Looking a this logic, I could see someone making a change and breaking the channels that are returned.
geido
left a comment
There was a problem hiding this comment.
Thanks for all the hard work on this!
| return WebClient(token=token, proxy=current_app.config["SLACK_PROXY"]) | ||
|
|
||
|
|
||
| def get_channels_with_search( |
There was a problem hiding this comment.
So bad that we need this function that seems prone to errors but if Slack does not allow searching, then we are out of luck
| except ReportScheduleUnexpectedError: | ||
| logger.exception( | ||
| "An unexpected occurred while executing the report: %s", task_id | ||
| "An unexpected error occurred while executing the report: %s", task_id |
geido
left a comment
There was a problem hiding this comment.
A bunch of minor comments from a second look. Still LGTM.
| ); | ||
|
|
||
| const recipientsInput = screen.getByTestId('recipients'); | ||
| fireEvent.change(recipientsInput, { |
There was a problem hiding this comment.
Can we use userEvent here instead and everywhere else?
There was a problem hiding this comment.
I can in two places, but it doesn't work in the others.
| return self.response(200, result=channels) | ||
| except SupersetException as ex: | ||
| logger.error("Error fetching slack channels %s", str(ex)) | ||
| return self.response_422(message=str(ex)) |
There was a problem hiding this comment.
Do we want to expose the original error message here?
There was a problem hiding this comment.
Yes, because it gives information about how to fix the slack issue. Whether it's missing a scope or the channel doesn't exist. Otherwise, it's difficult to know how to unblock the error.
94c337c to
f7e4a1e
Compare
|
Ephemeral environment shutdown and build artifacts deleted. |
SUMMARY
SeeSIP
This PR adds a new Notification
SlackV2Notificationthat uses the Slack upload files v1 method. It is required for slack workspace owners to add thechannels:readscope to their workspace in order to use this api. It also fetches all slack channels in order to convert user-inputed names to api-required ids. Because of this, I added a UI to support this.Per the SIP, the both the api and UI will attempt to convert the notification to SlackV2 if the scopes are in place.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
After:
With feature flag on:
Screen.Recording.2024-07-10.at.4.33.54.PM.mov
With feature flag off (after it has been turned on once, so the existing v2 slack reports do not convert back to v1):
Screen.Recording.2024-07-10.at.4.35.23.PM.mov
TESTING INSTRUCTIONS
Create a new slack application and connect it to Superset.
ADDITIONAL INFORMATION