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

feat: send report data to Slack #15806

Merged
merged 8 commits into from
Jul 29, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

Send embedded report data (see #15805) to Slack when user selects "TEXT" as the format.

When the user selects "TEXT" format and Slack delivery for a chart on a report, we send a truncated table to the channel. Slack limits the pre-formatted text to approximately 25 rows, so the table is truncated at 19 rows.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-07-20 at 4 22 59 PM

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #15806 (d2174d9) into master (3adf8e8) will decrease coverage by 0.05%.
The diff coverage is 55.26%.

❗ Current head d2174d9 differs from pull request most recent head 925d688. Consider uploading reports for the commit 925d688 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15806      +/-   ##
==========================================
- Coverage   76.83%   76.78%   -0.06%     
==========================================
  Files         988      988              
  Lines       52195    52321     +126     
  Branches     7095     7124      +29     
==========================================
+ Hits        40106    40173      +67     
- Misses      11864    11923      +59     
  Partials      225      225              
Flag Coverage Δ
mysql 81.49% <86.36%> (-0.04%) ⬇️
postgres 81.56% <86.36%> (+0.05%) ⬆️
python 81.65% <86.36%> (+<0.01%) ⬆️
sqlite 81.16% <86.36%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...-frontend/src/components/CronPicker/CronPicker.tsx 91.66% <ø> (ø)
superset-frontend/src/views/CRUD/alert/types.ts 100.00% <ø> (ø)
...set-frontend/src/views/CRUD/data/database/types.ts 100.00% <ø> (ø)
superset-frontend/src/views/CRUD/hooks.ts 47.80% <0.00%> (-0.43%) ⬇️
superset/annotation_layers/annotations/api.py 84.96% <ø> (ø)
superset/reports/logs/api.py 94.11% <ø> (ø)
...c/views/CRUD/data/database/DatabaseModal/index.tsx 44.89% <20.83%> (-2.69%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/styles.ts 81.57% <25.00%> (-2.06%) ⬇️
.../database/DatabaseModal/DatabaseConnectionForm.tsx 54.00% <28.57%> (-9.10%) ⬇️
...et-frontend/src/dashboard/components/Dashboard.jsx 78.84% <50.00%> (-0.57%) ⬇️
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3adf8e8...925d688. Read the comment docs.

@@ -111,6 +111,7 @@ def get_git_sha():
"sqlalchemy>=1.3.16, <1.4, !=1.3.21",
"sqlalchemy-utils>=0.36.6,<0.37",
"sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562
"tabulate==0.8.9",
Copy link
Member

Choose a reason for hiding this comment

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

You will have to update the requirements. Additionally strict pinning of packages in setup.py is undesirable as it may overly constrain the frozen solution space. Please use limits if strictly necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

@john-bodley I did run pip-compile-multi --no-upgrade, you can see that requirements/base.txt was updated to include the dependency (it has no additional dependencies of its own).

Also, my understanding is that it's better to pin the version for dependencies with version 0.x, since there's no guarantee that a minor upgrade will maintain backwards compatibility (https://semver.org/#spec-item-4).

@betodealmeida betodealmeida changed the base branch from ch16684 to master July 28, 2021 16:59
@betodealmeida betodealmeida merged commit 6afa840 into apache:master Jul 29, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
* feat: send data embedded in report email

* Change post-processing to use new endpoint

* Show TEXT option only to text-based vizs

* Fix test

* feat: send data embedded in report email

* feat: send report data to Slack

* Add unit test

* trigger tests
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* feat: send data embedded in report email

* Change post-processing to use new endpoint

* Show TEXT option only to text-based vizs

* Fix test

* feat: send data embedded in report email

* feat: send report data to Slack

* Add unit test

* trigger tests
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* feat: send data embedded in report email

* Change post-processing to use new endpoint

* Show TEXT option only to text-based vizs

* Fix test

* feat: send data embedded in report email

* feat: send report data to Slack

* Add unit test

* trigger tests
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* feat: send data embedded in report email

* Change post-processing to use new endpoint

* Show TEXT option only to text-based vizs

* Fix test

* feat: send data embedded in report email

* feat: send report data to Slack

* Add unit test

* trigger tests
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants