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: add descriptions to report emails #13827

Merged
merged 8 commits into from
Apr 12, 2021

Conversation

samtfm
Copy link
Contributor

@samtfm samtfm commented Mar 26, 2021

SUMMARY

Adds the report description to the report email body and slack notification

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-03-29 at 3 51 43 PM

Screen Shot 2021-03-29 at 4 56 36 PM

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@@ -70,9 +70,11 @@ def _get_content(self) -> EmailContent:
image = {msgid: self._content.screenshot.image}
body = __(
"""
<p>%(description)s</p>
Copy link
Member

Choose a reason for hiding this comment

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

Is the description just for emails?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that was the ask. Should I also add the description to slack notifications while I'm at it?

Copy link
Member

Choose a reason for hiding this comment

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

@junlincc ^^^

Copy link
Member

Choose a reason for hiding this comment

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

Yes, let's add description to slack notifs as well.

@samtfm samtfm marked this pull request as ready for review March 29, 2021 23:58
@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #13827 (d70523a) into master (f06d534) will increase coverage by 0.00%.
The diff coverage is 91.47%.

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

@@           Coverage Diff            @@
##           master   #13827    +/-   ##
========================================
  Coverage   79.21%   79.22%            
========================================
  Files         936      940     +4     
  Lines       47408    47598   +190     
  Branches     5940     5979    +39     
========================================
+ Hits        37554    37708   +154     
- Misses       9727     9764    +37     
+ Partials      127      126     -1     
Flag Coverage Δ
cypress 56.06% <60.00%> (+0.01%) ⬆️
hive 80.47% <90.64%> (+0.19%) ⬆️
mysql 80.74% <90.14%> (+0.16%) ⬆️
postgres 80.77% <90.14%> (+0.16%) ⬆️
presto ?
python 81.18% <90.64%> (+0.03%) ⬆️
sqlite 80.37% <90.14%> (+0.20%) ⬆️

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

Impacted Files Coverage Δ
...rset-frontend/src/components/ErrorMessage/types.ts 100.00% <ø> (ø)
...end/src/components/IndeterminateCheckbox/index.tsx 100.00% <ø> (ø)
...ntend/src/dashboard/components/CssEditor/index.jsx 95.83% <ø> (ø)
...end/src/dashboard/components/SliceHeader/index.tsx 41.02% <ø> (ø)
...dashboard/components/menu/ShareMenuItems/index.tsx 25.00% <ø> (ø)
...nd/src/explore/components/DataTablesPane/index.tsx 88.88% <ø> (ø)
...ols/MetricControl/AdhocMetricEditPopover/index.jsx 84.09% <ø> (ø)
...c/filters/components/Select/SelectFilterPlugin.tsx 50.00% <ø> (-30.96%) ⬇️
superset/reports/notifications/email.py 100.00% <ø> (ø)
superset/views/base.py 76.86% <ø> (+0.74%) ⬆️
... and 54 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 f06d534...1145f97. Read the comment docs.

@samtfm samtfm force-pushed the samtfm/add-report-description branch from 665c9c4 to 5443ace Compare March 30, 2021 18:39
@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 2, 2021
@willbarrett
Copy link
Member

@samtfm you may want to rebase or merge from master - there are some conflicts here :)

@samtfm samtfm force-pushed the samtfm/add-report-description branch from a5261fa to a7d9da5 Compare April 5, 2021 23:38
@pull-request-size pull-request-size bot added size/S and removed size/M labels Apr 5, 2021
Copy link
Member

@willbarrett willbarrett left a comment

Choose a reason for hiding this comment

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

LGTM once CI is green.

@samtfm
Copy link
Contributor Author

samtfm commented Apr 6, 2021

LGTM once CI is green.

It looks like the failing python test tests/datasets/api_tests.py::TestDatasetApi::test_get_dataset_distinct_schema is also failing on master.

@willbarrett
Copy link
Member

@samtfm looks like master is green, a rebase will likely solve your build issue.

@samtfm samtfm force-pushed the samtfm/add-report-description branch from 667374b to 82a2455 Compare April 7, 2021 17:34
@samtfm
Copy link
Contributor Author

samtfm commented Apr 7, 2021

I was getting failures running this test on my local master, but I'll try rebasing in case that was some local anomaly

@willbarrett
Copy link
Member

@samtfm looks like most required checks are passing, I think you just need to run black on a couple of files to make the pre-commit check pass.

1 similar comment
@willbarrett
Copy link
Member

@samtfm looks like most required checks are passing, I think you just need to run black on a couple of files to make the pre-commit check pass.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Apr 8, 2021
@pull-request-size pull-request-size bot added size/S and removed size/M labels Apr 9, 2021
@willbarrett willbarrett merged commit 778bb8e into apache:master Apr 12, 2021
@willbarrett willbarrett deleted the samtfm/add-report-description branch April 12, 2021 15:50
amitmiran137 pushed a commit that referenced this pull request Apr 13, 2021
* master:
  fix: unable to apply logging format (#14074)
  refactor: Bootstrap to AntD - Slider (#13989)
  chore(spa refactor): refactoring dashboard to use api's instead of bootstrapdata (#13306)
  fix(listview): update listview feature flag (#13906)
  Add docs for configuring Docker Compose setup (#13961)
  feat: invalid password error message (Postgres) (#14038)
  fix: flacky test in test_update_dataset_item_w_override_columns (#14082)
  feat: Implement Celery SoftTimeLimit handling (#13740)
  feat: only send alert error emails to owners of the alert (#13862)
  feat: add descriptions to report emails (#13827)
  Make chart exclude itself from cross filtering (#14046)
  fix: fix bug when remove chart not  removing it's related cross filter data (#14081)
  feat(native-filters): Add default first value to select filter (#13726)
  feat: Make async query JWT cookie domain configurable (#14007)
  fix: add exception to catch session not having JWT (#14036)

# Conflicts:
#	superset-frontend/src/dashboard/actions/hydrate.js
#	superset/views/core.py
amitmiran137 pushed a commit that referenced this pull request Apr 13, 2021
* master: (53 commits)
  test: Adds tests to the UndoRedoKeyListeners component (#13919)
  chore: Adds dataMask reducer to reducerIndex (#13951)
  test: Tests audit for the Dashboard FilterBar (#13916)
  fix: unable to apply logging format (#14074)
  refactor: Bootstrap to AntD - Slider (#13989)
  chore(spa refactor): refactoring dashboard to use api's instead of bootstrapdata (#13306)
  fix(listview): update listview feature flag (#13906)
  Add docs for configuring Docker Compose setup (#13961)
  feat: invalid password error message (Postgres) (#14038)
  fix: flacky test in test_update_dataset_item_w_override_columns (#14082)
  feat: Implement Celery SoftTimeLimit handling (#13740)
  feat: only send alert error emails to owners of the alert (#13862)
  feat: add descriptions to report emails (#13827)
  Make chart exclude itself from cross filtering (#14046)
  fix: fix bug when remove chart not  removing it's related cross filter data (#14081)
  feat(native-filters): Add default first value to select filter (#13726)
  feat: Make async query JWT cookie domain configurable (#14007)
  fix: add exception to catch session not having JWT (#14036)
  Use consistent chart value (#14031)
  fix: Use superset generic db to catch external_metadata queries (#13974)
  ...
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* add description to report email

* add report description to slack notification

* fix issues caught by linter

* fix long line

* remove extra line

* handle missing descriptions

* run python black

* properly run python black
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* add description to report email

* add report description to slack notification

* fix issues caught by linter

* fix long line

* remove extra line

* handle missing descriptions

* run python black

* properly run python black
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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/S 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants