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

[dashboard] fix, enable info endpoint #9015

Merged
merged 2 commits into from
Jan 25, 2020

Conversation

nytai
Copy link
Member

@nytai nytai commented Jan 24, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

The new dashboard list view #8845 depends on the info endpoint to generate filters and check delete/export permissions. It seems it was disabled in the recent work to remove unused routes. This PR re-enabled that endpoint for the rest apis.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

  • Dashboard List view works.
  • _info endpoint does not error out on loading the dashboard list view.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

REVIEWERS

@dpgaspar @mistercrunch

@nytai nytai changed the title Tai/fix info endpoint [dashboard] fix, enable info endpoint Jan 24, 2020
Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-io
Copy link

Codecov Report

Merging #9015 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9015   +/-   ##
=======================================
  Coverage   59.15%   59.15%           
=======================================
  Files         367      367           
  Lines       11682    11682           
  Branches     2864     2864           
=======================================
  Hits         6910     6910           
  Misses       4593     4593           
  Partials      179      179

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 a85df65...6a16f40. Read the comment docs.

@@ -58,4 +59,4 @@ class RouteMethod: # pylint: disable=too-few-public-methods
# Commonly used sets
CRUD_SET = {ADD, LIST, EDIT, DELETE, ACTION_POST}
RELATED_VIEW_SET = {ADD, LIST, EDIT, DELETE}
REST_MODEL_VIEW_CRUD_SET = {DELETE, GET, GET_LIST, POST, PUT}
REST_MODEL_VIEW_CRUD_SET = {DELETE, GET, GET_LIST, POST, PUT, INFO}
Copy link
Member

Choose a reason for hiding this comment

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

I'm a little concerned with this pattern overall. Altering these "defaults" down the road could lead to unintended side effects.

Copy link
Member Author

Choose a reason for hiding this comment

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

We can remove it from the default and enable the info endpoint on a per-case basis. That was the original approach: a5488e2
but it seems like we'll need to info endpoint in most cases

@etr2460
Copy link
Member

etr2460 commented Jan 25, 2020

@nytai can we either revert the breaking PR #8960 or merge this ASAP? The dashboard list view is now broken in master, and we're unable to deploy from master

@etr2460
Copy link
Member

etr2460 commented Jan 25, 2020

i'm going to merge this to unbreak master. We can make necessary fixes next week.

I'm choosing this approach over reverting the API change PR as that one was tagged as a security PR

@etr2460 etr2460 merged commit c552c85 into apache:master Jan 25, 2020
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Jan 25, 2020
* [dashboard] fix, enable info endpoint

* add info to REST_MODEL_VIEW_CRUD_SET

(cherry picked from commit c552c85)
@nytai nytai deleted the tai/fix-info-endpoint branch January 27, 2020 22:51
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 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/XS 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants