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 Certified filter to Datasets #20136

Merged
merged 5 commits into from
May 23, 2022

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented May 19, 2022

Screen.Recording.2022-05-19.at.6.29.02.PM.mov

SUMMARY

Allowing users to know filter by Dataset.extra.certification. Using is like check in the ORM to validate

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@hughhhh
Copy link
Member Author

hughhhh commented May 19, 2022

@eric-briscoe

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #20136 (e786dfc) into master (e2f11d3) will decrease coverage by 0.15%.
The diff coverage is 59.32%.

❗ Current head e786dfc differs from pull request most recent head 169022a. Consider uploading reports for the commit 169022a to get more accurate results

@@            Coverage Diff             @@
##           master   #20136      +/-   ##
==========================================
- Coverage   66.45%   66.29%   -0.16%     
==========================================
  Files        1721     1721              
  Lines       64497    64532      +35     
  Branches     6805     6811       +6     
==========================================
- Hits        42860    42782      -78     
- Misses      19905    20017     +112     
- Partials     1732     1733       +1     
Flag Coverage Δ
hive ?
mysql 82.14% <92.68%> (+<0.01%) ⬆️
postgres 82.20% <92.68%> (+<0.01%) ⬆️
presto ?
python 82.28% <92.68%> (-0.35%) ⬇️
sqlite 81.94% <92.68%> (+<0.01%) ⬆️
unit ?

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

Impacted Files Coverage Δ
...plugins/legacy-plugin-chart-heatmap/src/Heatmap.js 0.00% <0.00%> (ø)
...in-chart-echarts/src/MixedTimeseries/buildQuery.ts 100.00% <ø> (ø)
.../plugin-chart-echarts/src/Timeseries/buildQuery.ts 66.66% <ø> (ø)
...hart-pivot-table/src/react-pivottable/utilities.js 0.00% <0.00%> (ø)
...et-frontend/src/explore/reducers/exploreReducer.js 28.75% <0.00%> (ø)
...t-frontend/src/explore/reducers/getInitialState.ts 0.00% <ø> (ø)
superset-frontend/src/utils/localStorageHelpers.ts 90.00% <ø> (ø)
...ontend/src/views/CRUD/data/dataset/DatasetList.tsx 55.31% <ø> (ø)
...end/src/dashboard/components/SliceHeader/index.tsx 86.27% <60.00%> (-0.96%) ⬇️
superset/datasets/filters.py 86.95% <70.00%> (-13.05%) ⬇️
... and 24 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 e2f11d3...169022a. Read the comment docs.

@hughhhh hughhhh force-pushed the hugh-dataset-certified branch from bd66b8f to 166b352 Compare May 19, 2022 22:44
@eschutho
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@eschutho Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

@eschutho Ephemeral environment creation failed. Please check the Actions logs for details.

@eschutho
Copy link
Member

This is great! Can you add a test? @AAfghahi wrote some nice tests for his database filters here that you could prob use for inspiration: https://github.com/apache/superset/pull/19051/files#diff-b94e273d2b41d3fe8a552cbf34cfa59ab9495154d16823b411470ae782cea38a

@eschutho
Copy link
Member

eschutho commented May 19, 2022

Also I was going to test what happens if the word "certification" is in the warning for example, and if so, we may want to lengthen the search string to "certification":

@hughhhh hughhhh force-pushed the hugh-dataset-certified branch from 82063af to b4224db Compare May 23, 2022 16:40
@hughhhh hughhhh force-pushed the hugh-dataset-certified branch from b4224db to 9a368cb Compare May 23, 2022 17:10
Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

LGTM!

@hughhhh hughhhh added the need:qa-review Requires QA review label May 23, 2022
@jinghua-qa
Copy link
Member

/testenv up

"sql": [DatasetIsNullOrEmptyFilter],
"id": [DatasetCertifiedFilter],
}
search_columns = ["id", "database", "owners", "sql", "table_name"]
Copy link
Member

Choose a reason for hiding this comment

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

I believe that this limits search to only these columns, is that the intention?

Copy link
Member

Choose a reason for hiding this comment

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

I did this with my filter PR and it broke a lot of things.

Copy link
Member Author

Choose a reason for hiding this comment

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

if i don't set the search columns, the new filter won't be referenced. So i'm explicitly setting it here just like the other API classes

name = _("Is certified")
arg_name = "dataset_is_certified"

def apply(self, query: Query, value: Any) -> Query:
Copy link
Member

Choose a reason for hiding this comment

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

it looks like value here is just a boolean?

@github-actions
Copy link
Contributor

@jinghua-qa Ephemeral environment spinning up at http://52.25.126.26:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@hughhhh hughhhh force-pushed the hugh-dataset-certified branch from 914b360 to bc0480f Compare May 23, 2022 18:43
@hughhhh hughhhh force-pushed the hugh-dataset-certified branch from bc0480f to 169022a Compare May 23, 2022 18:52
@jinghua-qa
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@jinghua-qa Ephemeral environment spinning up at http://35.89.165.229:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@jinghua-qa
Copy link
Member

LGTM

@hughhhh hughhhh merged commit f8ea778 into apache:master May 23, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.0 labels Mar 13, 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 need:qa-review Requires QA review size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants