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: deprecate old API on core superset fave_dashboards #19754

Merged

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Apr 18, 2022

SUMMARY

Following plan to gradually deprecate "REST" endpoints on /superset namespace.

Deprecates /superset//fave_dashboards/<int:user_id>/. Proposed removal on Superset 3.0
Deprecates /fave_dashboards_by_username/<username>/. Proposed removal on Superset 3.0

Replaced by an existing endpoint /api/v1/dashboard/, includes the necessary frontend migration.

NOTE: The use of the generic get list endpoint will not fetch the date when the dashboard was favorited, this would force us to create a new endpoint specifically for this query or always enforce N+1 queries on the get list (not an option).

I've Replaced this date by the humanised version of the dashboard creation date.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screenshot 2022-04-18 at 12 22 01

After:

Screenshot 2022-04-18 at 12 17 21

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

@codecov
Copy link

codecov bot commented Apr 18, 2022

Codecov Report

Merging #19754 (994739c) into master (57157c8) will decrease coverage by 0.11%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master   #19754      +/-   ##
==========================================
- Coverage   66.51%   66.39%   -0.12%     
==========================================
  Files        1687     1692       +5     
  Lines       64620    64779     +159     
  Branches     6646     6661      +15     
==========================================
+ Hits        42980    43010      +30     
- Misses      19940    20069     +129     
  Partials     1700     1700              
Flag Coverage Δ
hive 52.85% <0.00%> (+0.15%) ⬆️
javascript 51.24% <75.00%> (+0.05%) ⬆️
mysql ?
postgres ?
presto 52.70% <0.00%> (+0.15%) ⬆️
python 82.07% <100.00%> (-0.36%) ⬇️
sqlite 81.72% <100.00%> (-0.05%) ⬇️
unit 47.93% <0.00%> (+0.17%) ⬆️

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

Impacted Files Coverage Δ
superset-frontend/src/types/bootstrapTypes.ts 100.00% <ø> (ø)
...rset-frontend/src/profile/components/Favorites.tsx 77.77% <75.00%> (+6.34%) ⬆️
superset/views/core.py 76.61% <100.00%> (-0.40%) ⬇️
superset/sql_validators/postgres.py 50.00% <0.00%> (-50.00%) ⬇️
superset/migrations/shared/utils.py 36.17% <0.00%> (-39.39%) ⬇️
superset/tables/models.py 67.53% <0.00%> (-32.47%) ⬇️
superset/databases/commands/create.py 64.70% <0.00%> (-27.46%) ⬇️
superset/views/database/mixins.py 60.34% <0.00%> (-20.69%) ⬇️
...uperset-frontend/src/components/Collapse/index.tsx 90.00% <0.00%> (-10.00%) ⬇️
superset/databases/commands/update.py 85.71% <0.00%> (-8.17%) ⬇️
... and 66 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 57157c8...994739c. Read the comment docs.

@dpgaspar dpgaspar requested a review from eschutho April 18, 2022 13:29
Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

Yey. ccing @rusackas for any feedback on the layout changes

@dpgaspar dpgaspar requested a review from rusackas April 19, 2022 09:23
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.

LGTM

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM!

@dpgaspar dpgaspar merged commit 85b0ef8 into apache:master May 2, 2022
@dpgaspar dpgaspar deleted the feat/deprecate-api-fave-dashboards branch May 2, 2022 15:24
hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
* feat: deprecate old API on core superset fave_dashboards

* fix js lint

* remove unused type
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* feat: deprecate old API on core superset fave_dashboards

* fix js lint

* remove unused type
@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 preset-io size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants