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 incorrect datasource_name in dashboard export #7892

Merged
merged 1 commit into from
Jul 23, 2019

Conversation

smacker
Copy link
Contributor

@smacker smacker commented Jul 18, 2019

CATEGORY

Choose one

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

SUMMARY

The bug was introduced in #7773

It uses filter by cls.table_name == datasource_name:
https://github.com/apache/incubator-superset/pull/7773/files#diff-a8dd5ec8d8decda2e3c5571d1ec0cdb6R740

But export puts slc.datasource.name into exported json:
https://github.com/apache/incubator-superset/pull/7773/files#diff-ceeb7eee8d573333109e0037299c9711L673

slc.datasource.name in case of SqlaTable is "{}.{}".format(self.schema, self.table_name)

TEST PLAN

Export any dashboard using UI, delete it and try to import again.

REVIEWERS

@mistercrunch

The bug was introduced in apache#7773

It uses filter by `cls.table_name == datasource_name`:
https://github.com/apache/incubator-superset/pull/7773/files#diff-a8dd5ec8d8decda2e3c5571d1ec0cdb6R740

But export puts `slc.datasource.name` into exported json:
https://github.com/apache/incubator-superset/pull/7773/files#diff-ceeb7eee8d573333109e0037299c9711L673

`slc.datasource.name` in case of `SqlaTable` is `"{}.{}".format(self.schema, self.table_name)`
@codecov-io
Copy link

codecov-io commented Jul 18, 2019

Codecov Report

Merging #7892 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7892   +/-   ##
=======================================
  Coverage   65.78%   65.78%           
=======================================
  Files         461      461           
  Lines       22187    22187           
  Branches     2425     2425           
=======================================
  Hits        14596    14596           
  Misses       7470     7470           
  Partials      121      121
Impacted Files Coverage Δ
superset/models/core.py 82.95% <ø> (ø) ⬆️

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 174a48a...66a83b0. Read the comment docs.

@mistercrunch
Copy link
Member

My bad, thanks for fixing this 🐛

@mistercrunch mistercrunch merged commit 2221445 into apache:master Jul 23, 2019
alex-mark pushed a commit to alex-mark/incubator-superset that referenced this pull request Jul 29, 2019
The bug was introduced in apache#7773

It uses filter by `cls.table_name == datasource_name`:
https://github.com/apache/incubator-superset/pull/7773/files#diff-a8dd5ec8d8decda2e3c5571d1ec0cdb6R740

But export puts `slc.datasource.name` into exported json:
https://github.com/apache/incubator-superset/pull/7773/files#diff-ceeb7eee8d573333109e0037299c9711L673

`slc.datasource.name` in case of `SqlaTable` is `"{}.{}".format(self.schema, self.table_name)`
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 28, 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/XS 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants