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 and create new API for dashes created by me #19434

Merged
merged 17 commits into from
Apr 8, 2022

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Mar 30, 2022

SUMMARY

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

Deprecates /superset/created_dashboards/<int:user_id>/. Proposed removal on Superset 3.0
Replaced by an existing endpoint /api/v1/dashboard/, includes the necessary frontend migration.

TESTING INSTRUCTIONS

Navigate to the user profile and assert that created dashboards renders correctly

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

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 31, 2022
@dpgaspar dpgaspar marked this pull request as ready for review April 6, 2022 12:44
@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #19434 (c2d85a4) into master (1cd8b41) will decrease coverage by 0.07%.
The diff coverage is 84.74%.

❗ Current head c2d85a4 differs from pull request most recent head 0a454e3. Consider uploading reports for the commit 0a454e3 to get more accurate results

@@            Coverage Diff             @@
##           master   #19434      +/-   ##
==========================================
- Coverage   66.66%   66.58%   -0.08%     
==========================================
  Files        1678     1680       +2     
  Lines       64261    64293      +32     
  Branches     6561     6564       +3     
==========================================
- Hits        42837    42812      -25     
- Misses      19723    19779      +56     
- Partials     1701     1702       +1     
Flag Coverage Δ
hive 52.67% <67.85%> (-0.04%) ⬇️
mysql 81.89% <85.71%> (-0.02%) ⬇️
postgres ?
presto 52.52% <67.85%> (-0.04%) ⬇️
python 82.23% <85.71%> (-0.16%) ⬇️
sqlite ?
unit 47.23% <48.21%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...-chart-deckgl/src/layers/Screengrid/Screengrid.jsx 0.00% <ø> (ø)
...rontend/src/SqlLab/components/QueryTable/index.tsx 68.96% <ø> (ø)
...rontend/src/visualizations/TimeTable/TimeTable.jsx 0.00% <ø> (ø)
superset/constants.py 100.00% <ø> (ø)
superset/db_engine_specs/__init__.py 84.61% <ø> (-3.85%) ⬇️
superset/connectors/sqla/utils.py 85.71% <42.85%> (-8.86%) ⬇️
superset/migrations/shared/utils.py 75.55% <42.85%> (-6.50%) ⬇️
...frontend/src/profile/components/CreatedContent.tsx 71.42% <50.00%> (ø)
...end/src/components/Datasource/DatasourceEditor.jsx 69.36% <100.00%> (ø)
superset/connectors/sqla/models.py 89.45% <100.00%> (+0.14%) ⬆️
... and 38 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 1cd8b41...0a454e3. Read the comment docs.

@dpgaspar dpgaspar requested review from eschutho and villebro April 6, 2022 13:54
superset/dashboards/api.py Outdated Show resolved Hide resolved
superset/dashboards/dao.py Outdated Show resolved Hide resolved
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.

One small nit, waiting to rereview once the refactor proposed by @eschutho has been done.

superset/dashboards/api.py Outdated Show resolved Hide resolved
superset/views/core.py Outdated Show resolved Hide resolved
@dpgaspar dpgaspar requested review from villebro and eschutho April 7, 2022 13:58
@dpgaspar dpgaspar merged commit d6d2777 into apache:master Apr 8, 2022
@dpgaspar dpgaspar deleted the feat/dashboards-created-by-me branch April 8, 2022 08:05
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
…pache#19434)

* feat: deprecate old API and create new API for dashes created by me

* add tests

* fix previous test

* fix test and lint

* fix sqlite test

* fix lint

* fix lint

* lint

* fix tests

* fix tests

* use dashboards get list instead

* clean unnecessary marshmallow schema

* Update superset/views/core.py

Co-authored-by: Ville Brofeldt <[email protected]>

* lint

Co-authored-by: Ville Brofeldt <[email protected]>
@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/L 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants