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

chore: Migrate /superset/favstar to API v1 #23165

Merged
merged 4 commits into from
Mar 29, 2023

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

Continuing the effort on deprecating all /superset/ REST API endpoints
Deprecates /superset/favstar, which allowed to fav/unfav/count charts/dashboards for:

  • /api/v1/dashboard/<pk>/favorites/ POST/DELETE (to add/remove fav status)
  • /api/v1/chart/<pk>/favorites/ POST/DELETE (to add/remove fav status)
  • Replaced the usage of /superset/favstar to check for favorite status in favor of the /favorite_status resource within dashboard/chart resource.

Also, fixed an issue that would only load the favorite status for a given chart/dashboard in explore once, so, if the user went back and selected a different one, the change didn't reflect.

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

@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Merging #23165 (fe72db2) into master (4220d32) will decrease coverage by 0.09%.
The diff coverage is 82.14%.

❗ Current head fe72db2 differs from pull request most recent head 58bfd44. Consider uploading reports for the commit 58bfd44 to get more accurate results

@@            Coverage Diff             @@
##           master   #23165      +/-   ##
==========================================
- Coverage   67.67%   67.59%   -0.09%     
==========================================
  Files        1910     1913       +3     
  Lines       73710    73906     +196     
  Branches     7973     8019      +46     
==========================================
+ Hits        49882    49954      +72     
- Misses      21787    21910     +123     
- Partials     2041     2042       +1     
Flag Coverage Δ
hive ?
javascript 53.88% <21.42%> (+<0.01%) ⬆️
mysql 78.48% <94.28%> (+0.03%) ⬆️
postgres 78.54% <94.28%> (+0.03%) ⬆️
presto 52.65% <48.57%> (-0.01%) ⬇️
python 82.20% <94.28%> (-0.16%) ⬇️
sqlite 77.04% <94.28%> (+0.03%) ⬆️
unit 52.63% <71.42%> (+0.04%) ⬆️

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

Impacted Files Coverage Δ
...t-frontend/src/dashboard/actions/dashboardState.js 55.28% <0.00%> (-0.49%) ⬇️
...rontend/src/dashboard/containers/DashboardPage.tsx 8.79% <0.00%> (ø)
superset-frontend/src/views/CRUD/hooks.ts 47.05% <0.00%> (ø)
superset/constants.py 100.00% <ø> (ø)
...set-frontend/src/explore/actions/exploreActions.ts 61.53% <25.00%> (+4.03%) ⬆️
superset/charts/api.py 85.71% <90.90%> (+0.40%) ⬆️
superset/dashboards/api.py 92.34% <90.90%> (-0.09%) ⬇️
...uperset-frontend/src/components/FaveStar/index.tsx 100.00% <100.00%> (ø)
superset/charts/dao.py 92.98% <100.00%> (+2.07%) ⬆️
superset/dashboards/dao.py 96.79% <100.00%> (+0.26%) ⬆️
... and 1 more

... and 21 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@diegomedina248 diegomedina248 force-pushed the dm/chore/migrate-favstar-to-api-v1 branch 2 times, most recently from ac7c5dd to ec469b0 Compare February 23, 2023 02:34
@diegomedina248 diegomedina248 force-pushed the dm/chore/migrate-favstar-to-api-v1 branch from ec469b0 to f728b01 Compare February 23, 2023 02:48
@hughhhh hughhhh self-requested a review March 29, 2023 18:59
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Looks great! Happy to see the old endpoints getting deprecated!

@hughhhh hughhhh merged commit f2be53d into master Mar 29, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the dm/chore/migrate-favstar-to-api-v1 branch March 26, 2024 16:24
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/XL 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants