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 certifications to tables #11450

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Oct 27, 2020

SUMMARY

Adds certification details to tables in the new CRUD view and allows editing in both the old and new dataset editors

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2020-10-27 at 3 51 11 PM
Screen Shot 2020-10-27 at 3 50 55 PM
Screen Shot 2020-10-27 at 3 50 43 PM

TEST PLAN

Add extra data to a table, see the certification details
Also test invalid data in extra and see no JS exceptions

ADDITIONAL INFORMATION

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

to: @nytai @ktmud @john-bodley

@etr2460 etr2460 force-pushed the erik-ritter--table-certification-details branch from 98288f0 to 91c6344 Compare October 27, 2020 23:10
@codecov-io
Copy link

codecov-io commented Oct 27, 2020

Codecov Report

Merging #11450 into master will decrease coverage by 4.30%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11450      +/-   ##
==========================================
- Coverage   66.58%   62.28%   -4.31%     
==========================================
  Files         863      870       +7     
  Lines       40985    41669     +684     
  Branches     3694     3802     +108     
==========================================
- Hits        27290    25953    -1337     
- Misses      13598    15537    +1939     
- Partials       97      179      +82     
Flag Coverage Δ
cypress ?
javascript 62.57% <71.42%> (-0.31%) ⬇️
python 62.10% <100.00%> (+0.21%) ⬆️

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

Impacted Files Coverage Δ
superset/connectors/sqla/views.py 67.26% <ø> (ø)
superset/datasets/api.py 92.85% <ø> (+0.11%) ⬆️
...ontend/src/views/CRUD/data/dataset/DatasetList.tsx 70.45% <66.66%> (-2.50%) ⬇️
...erset-frontend/src/datasource/DatasourceEditor.jsx 64.05% <100.00%> (-7.58%) ⬇️
superset/connectors/sqla/models.py 90.63% <100.00%> (+0.27%) ⬆️
superset/datasets/schemas.py 94.44% <100.00%> (+0.07%) ⬆️
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/index.jsx 0.00% <0.00%> (-100.00%) ⬇️
... and 240 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 88e5e98...27c84be. Read the comment docs.

@etr2460 etr2460 force-pushed the erik-ritter--table-certification-details branch from 91c6344 to bc163e9 Compare October 27, 2020 23:25
@ktmud
Copy link
Member

ktmud commented Oct 27, 2020

Should we add the verification icon to be after the table name? The alignment looks kind of weird right now. Imaging you have two tables starting with the same prefix and only one of them is verified:

booking_value_per_nights_by_country
[V] booking_value_per_nights_by_home_type
booking_value_per_nights_by_country
booking_value_per_nights_by_home_type [V]

@etr2460 etr2460 force-pushed the erik-ritter--table-certification-details branch from bc163e9 to edc5800 Compare October 28, 2020 03:21
@etr2460
Copy link
Member Author

etr2460 commented Oct 28, 2020

Design preference has typically been for the verification icon before the entity name. This pattern is used for metrics in superset, and also aligns to specs from @kenchendesign

@etr2460 etr2460 force-pushed the erik-ritter--table-certification-details branch 2 times, most recently from 52a08b7 to 013b075 Compare October 28, 2020 05:02
@rusackas
Copy link
Member

another rebase should fix the broken E2E test.

@etr2460 etr2460 force-pushed the erik-ritter--table-certification-details branch from 013b075 to 47938c1 Compare October 28, 2020 16:10
Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

LGTM, 2 small nits

description={t(
'Extra data to specify table metadata. Currently supports ' +
'certification data of the format: `{ "certification": { "certified_by": ' +
'"Taylor Swift", "details": "This table is the source of truth." ' +
Copy link
Member

Choose a reason for hiding this comment

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

Lol, I like how we codified Taylor Swift to the actual user interface. She's certainly not a controversial figure, but should we use a more "business friendly" example? E.g. "certified_by": "Data Platform Team"

Copy link
Member Author

Choose a reason for hiding this comment

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

fwiw, i've used her as an example before... https://github.com/apache/incubator-superset/search?q=Taylor+Swift

But happy to change them all if people have strong opinions. I seem to recall design from Preset indicating that Superset should have a friendly tone, so i would say Taylor Swift aligns with that tone.

Copy link
Member

@mistercrunch mistercrunch Oct 31, 2020

Choose a reason for hiding this comment

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

+1 on Taylor Swift
taylor

Or Batman. Batman may work too.

Copy link
Member

@mistercrunch mistercrunch Oct 31, 2020

Choose a reason for hiding this comment

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

Actually, thinking about this for a few more seconds, I vote let's draw the line on examples (where random/funny is ok) and keep tooltips / descriptions more businessy/serious

@@ -492,6 +492,7 @@ class SqlaTable( # pylint: disable=too-many-public-methods,too-many-instance-at
sql = Column(Text)
is_sqllab_view = Column(Boolean, default=False)
template_params = Column(Text)
extra = Column(Text)
Copy link
Member

Choose a reason for hiding this comment

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

We don't need a db migration for this? If so, maybe add a link in this PR to the migration script that has added this column?

Copy link
Member Author

Choose a reason for hiding this comment

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

The migration happened ages ago, see here: #10592

@etr2460 etr2460 force-pushed the erik-ritter--table-certification-details branch from 47938c1 to 27c84be Compare October 30, 2020 17:19
@etr2460 etr2460 merged commit ca40877 into apache:master Oct 30, 2020
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.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/M 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants