Skip to content

Conversation

@JaeGeunBang
Copy link

SUMMARY

I add ALERT_REPORT_SLACK_V2: True in FEATURE_FLAGS.

FEATURE_FLAGS = {
      "ALERT_REPORT_SLACK_V2": True
    }

After switching to the Slack V2 API, I'm now sending .csv files via Superset Reports. The following issue has occurred. Slack should display the data as CSV, but it's being displayed as plain text.

Note that this issue didn't occur in Slack V1. Please see the screenshot below.

So, I discovered the issue in the Slack V2 code, fixed it, and confirmed that the CSV file is now displayed properly in Slack.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Slack V1
스크린샷 2025-11-13 오후 12 36 27

Slack V2
스크린샷 2025-11-13 오후 12 36 34

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Nov 13, 2025

Code Review Agent Run #f4672a

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 2fb2305..2fb2305
    • superset/reports/notifications/slackv2.py
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added the alert-reports Namespace | Anything related to the Alert & Reports feature label Nov 13, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

I've completed my review and didn't find any issues.

Files scanned
File Path Reviewed
superset/reports/notifications/slackv2.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

@sadpandajoe
Copy link
Member

@gabotorresruiz you've been digging into the slack code a bit, have you been seeing this too?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue where CSV files sent via Superset Reports to Slack using the V2 API were displayed as plain text instead of properly formatted CSV files. The fix wraps the raw bytes data in a BytesIO object before passing it to the Slack V2 files_upload_v2 API, which expects a file-like object.

  • Converts raw bytes to BytesIO object for Slack V2 API compatibility
  • Adds necessary import for the io module

@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 48.22%. Comparing base (008c7c6) to head (2fb2305).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
superset/reports/notifications/slackv2.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #36094       +/-   ##
===========================================
+ Coverage        0   48.22%   +48.22%     
===========================================
  Files           0      631      +631     
  Lines           0    45968    +45968     
  Branches        0     4981     +4981     
===========================================
+ Hits            0    22168    +22168     
- Misses          0    23175    +23175     
- Partials        0      625      +625     
Flag Coverage Δ
hive 43.97% <50.00%> (?)
presto 47.51% <50.00%> (?)
python 48.22% <50.00%> (?)
unit 100.00% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gabotorresruiz
Copy link
Contributor

@gabotorresruiz you've been digging into the slack code a bit, have you been seeing this too?

Hmm I haven't tested this, but I can definitely take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alert-reports Namespace | Anything related to the Alert & Reports feature size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants