-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
fix: [search query view] edit link is broken #10128
Conversation
superset/app.py
Outdated
@@ -241,14 +241,6 @@ def init_views(self) -> None: | |||
category_label=__("Manage"), | |||
category_icon="", | |||
) | |||
appbuilder.add_view( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to hide this as it is redundant with the search query page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes a public API - are we sure this won't break anything? Should it go through deprecation before being removed? Could this be done as a separate PR from the bugfix?
FYI @mistercrunch needs a rebase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's split out the view removal from the bugfix. Two separate logical changes with different levels of risk.
superset/app.py
Outdated
@@ -241,14 +241,6 @@ def init_views(self) -> None: | |||
category_label=__("Manage"), | |||
category_icon="", | |||
) | |||
appbuilder.add_view( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes a public API - are we sure this won't break anything? Should it go through deprecation before being removed? Could this be done as a separate PR from the bugfix?
@willbarrett the reason why I removed the view is that I'm polluting the list view with the Normally we would create a derivative I think it does make sense to kill the I'm hoping we can make a call on |
As you mention, extending the QueryView to retain the existing interface is simple - my vote would be to do that in this PR, then introduce another PR that changes the external API. I worry that a fix PR removing a publicly-available API won't receive the right level of scrutiny from organizations that might be leveraging it, and may be reverted later on. |
80cbf91
to
ad0cf1d
Compare
Realized digging deeper that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Just needed this today.
Related: #10162 |
* fix: [search query view] edit link is broken * eslint + mypy * rever app.py changes * addressing comments * use api/v1/query * fix test
SUMMARY
So somehow that link is using the
KV
model, and is broken whenKV_STORE = False
.Why is that link using
KV
(the generic key/value model)? Well I think originally it just passed?db_id={db_id}&sql={sql_string}
, but the SQL string can be too long as a GET param, so I'm guessing someone (maybe me, though I don't recall, didn't bother usinggit blame
to see the history here), decided to push the query info to KV and reference it instead. Not sure why, probably to mimic the "share query" feature (?). Anyhow, here I decided to just pass the query id and let the frontend do the work.Also did some minor cosmetic adjustements
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
before
after
TEST PLAN
Relying on existing tests, looking to add more coverage