dosubot[bot] commented on issue #29480:
URL: https://github.com/apache/superset/issues/29480#issuecomment-2574177992

   <!-- Answer -->
   To resolve the error related to the deprecated Slack API method, you need to 
update the Superset codebase, not the Helm chart itself. Specifically, you 
should modify the `superset/reports/notifications/slack.py` file to replace the 
deprecated `files_upload` method with the `files_upload_v2` method.
   
   Here's a brief guide on how to do this:
   
   1. **Locate the File**: Access the `superset/reports/notifications/slack.py` 
file in your Superset deployment.
   
   2. **Modify the Code**: Replace the usage of `files_upload` with 
`files_upload_v2`. Here's the code snippet you need to update:
   
      ```python
      for channel in channels:
          if len(files) > 0:
              for file in files:
                  client.files_upload_v2(
                      channel=channel,
                      file=file,
                      initial_comment=body,
                      title=title,
                  )
          else:
              client.chat_postMessage(channel=channel, text=body)
      ```
   
   3. **Deploy the Changes**: After making the changes, you need to redeploy 
your Superset application. If you're using a Helm chart, this typically 
involves building a new Docker image with your changes and updating your Helm 
deployment to use this new image.
   
   4. **Ensure Permissions**: Make sure your Slack app has the necessary 
permissions and scopes to use the `files_upload_v2` method.
   
   This change should resolve the error you're encountering with the deprecated 
Slack API method.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/cbc32365-c094-490d-af6a-59d1fe6cc581?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/cbc32365-c094-490d-af6a-59d1fe6cc581?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/cbc32365-c094-490d-af6a-59d1fe6cc581?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/cbc32365-c094-490d-af6a-59d1fe6cc581?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/cbc32365-c094-490d-af6a-59d1fe6cc581?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/cbc32365-c094-490d-af6a-59d1fe6cc581?feedback_type=other)</sup>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to