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

Fix for incorrect attaching of raw data files to email schedules chart report #8339

Closed
wants to merge 3 commits into from
Closed

Fix for incorrect attaching of raw data files to email schedules chart report #8339

wants to merge 3 commits into from

Conversation

mikalai-dev
Copy link

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

Schedule Email Reports fails in a case of attached data files. Present fix resolve this regression from the removal of the dependency request

TEST PLAN

ADDITIONAL INFORMATION

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

REVIEWERS

@villebro

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

First pass comments: please fix indentation error and run black for uniform code formatting.

data = {__("%(name)s.csv", name=slc.slice_name): response.content}
csv_content = ""
for r in content:
csv_content += str(r, 'utf-8')
Copy link
Member

Choose a reason for hiding this comment

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

Indentation here needs to be four spaces, not two.

@villebro
Copy link
Member

villebro commented Oct 3, 2019

You still need to run black on the modified files. Furthermore, the tests are failing because the CSV request mock in the test case conforms to the requests format, not urllib format. Check the following lines: https://github.com/apache/incubator-superset/blob/master/tests/schedules_test.py#L370_L374 and https://github.com/apache/incubator-superset/blob/master/tests/schedules_test.py#L396-L400 . Let me know if you need help modifying them.

README.md Outdated
@@ -214,3 +214,4 @@ the world know they are using Superset. Join our growing community!
1. [Zalando](https://www.zalando.com)
1. [Zalora](https://www.zalora.com)
1. [TME QQMUSIC/WESING](https://www.tencentmusic.com/)
1. [Facemetrics](https://facemetrics.io/)
Copy link
Member

Choose a reason for hiding this comment

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

nit: abc order please!

@villebro
Copy link
Member

@ngritsuk can I help you finalize this PR somehow? This is a regression that I would be very happy to see getting merged soon.

@mikalai-dev
Copy link
Author

@villebro Probably I'll have time to deal with tests at the end of this week. I'll be happy if you help me with them.

@stale
Copy link

stale bot commented Jan 2, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Jan 2, 2020
@stale stale bot closed this Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive Inactive for >= 30 days size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants