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: fix redash dashboard exporter #422

Merged
merged 2 commits into from
Dec 9, 2020

Conversation

gjxdxh
Copy link
Contributor

@gjxdxh gjxdxh commented Dec 8, 2020

Summary of Changes

Fix issues in redash dashboard exporter and added a few tests

Tests

modified unit test

Documentation

What documentation did you add or modify and why? Add any relevant links then remove this line

CheckList

Make sure you have checked all steps below to ensure a timely review.

  • PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"
  • PR includes a summary of changes.
  • PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
  • PR passes make test

@feng-tao
Copy link
Member

feng-tao commented Dec 8, 2020

@gjxdxh could you take a look at the CI error which fails mypy:

flake8 .
mypy .
databuilder/extractor/dashboard/redash/redash_dashboard_extractor.py:175: error: Argument 1 to "DashboardChart" has incompatible type "**Dict[str, object]"; expected "Optional[str]"
databuilder/extractor/dashboard/redash/redash_dashboard_extractor.py:175: error: Argument 1 to "DashboardChart" has incompatible type "**Dict[str, object]"; expected "str"
tests/unit/extractor/dashboard/redash/test_redash_dashboard_extractor.py:135: error: Argument "query_id" to "DashboardQuery" has incompatible type "int"; expected "Optional[str]"
tests/unit/extractor/dashboard/redash/test_redash_dashboard_extractor.py:146: error: Argument "query_id" to "DashboardChart" has incompatible type "int"; expected "str"
tests/unit/extractor/dashboard/redash/test_redash_dashboard_extractor.py:147: error: Argument "chart_id" to "DashboardChart" has incompatible type "int"; expected "str"
tests/unit/extractor/dashboard/redash/test_redash_dashboard_extractor.py:156: error: Incompatible types in assignment (expression has type "DashboardTable", variable has type "DashboardChart")
Found 6 errors in 2 files (checked 261 source files)
Makefile:15: recipe for target 'mypy' failed
make: *** [mypy] Error 1
Error: Process completed with exit code 2.

Signed-off-by: Lingkai Kong <lingkai.kong@databricks.com>
Signed-off-by: Lingkai Kong <lingkai.kong@databricks.com>
@feng-tao feng-tao changed the title fix redash dashboard exporter fix: fix redash dashboard exporter Dec 9, 2020
@feng-tao feng-tao merged commit fa626f5 into amundsen-io:master Dec 9, 2020
harmw pushed a commit to harmw/amundsendatabuilder that referenced this pull request Dec 13, 2020
* fix redash dashboard exporter

Signed-off-by: Lingkai Kong <lingkai.kong@databricks.com>

* fix mypy issue

Signed-off-by: Lingkai Kong <lingkai.kong@databricks.com>
Signed-off-by: Harm Weites <harm@weites.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants