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

fix: Revert to old endpoint temporarily to enable sharing saved queries #24434

Conversation

jfrag1
Copy link
Member

@jfrag1 jfrag1 commented Jun 16, 2023

SUMMARY

This PR is an alternative option to #24301 for re-enabling sharing saved queries; it simply reverts the change that broke it.

The long term fix for this will depend on the outcome of a future SIP

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

@jfrag1 jfrag1 marked this pull request as ready for review June 16, 2023 19:32
@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #24434 (d9fae3d) into master (01689b4) will decrease coverage by 0.01%.
The diff coverage is n/a.

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

@@            Coverage Diff             @@
##           master   #24434      +/-   ##
==========================================
- Coverage   68.93%   68.93%   -0.01%     
==========================================
  Files        1904     1904              
  Lines       73879    73879              
  Branches     8119     8119              
==========================================
- Hits        50928    50927       -1     
- Misses      20840    20841       +1     
  Partials     2111     2111              
Flag Coverage Δ
javascript 55.65% <ø> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/actions/sqlLab.js 69.16% <ø> (-0.27%) ⬇️

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

@hughhhh hughhhh self-requested a review June 17, 2023 18:14
@jfrag1 jfrag1 mentioned this pull request Jun 20, 2023
9 tasks
@@ -1372,12 +1372,11 @@ export function popStoredQuery(urlId) {
export function popSavedQuery(saveQueryId) {
return function (dispatch) {
return SupersetClient.get({
endpoint: `/api/v1/saved_query/${saveQueryId}`,
endpoint: `/savedqueryviewapi/api/get/${saveQueryId}`,
Copy link
Member

Choose a reason for hiding this comment

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

@jfrag1 thanks for the change. Is there any reason you opted for this approach as opposed to keeping the new endpoint and relaxing the SavedQueryFilter filter criterion? I guess the merit with the later is it's clearer how this works as opposed to the somewhat magical (and obscure) FAB REST API endpoint.

Copy link
Member Author

@jfrag1 jfrag1 Jun 20, 2023

Choose a reason for hiding this comment

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

@john-bodley The main reason I did it this way is that I'm pretty sure there are several FAB-generated endpoints under the SavedQueryRestApi that utilize the SavedQueryFilter (set as the base_filter on the class), and I didn't want to change the behavior for those. For example, the endpoint that fetches a list of a user's saved queries could start returning a list of all saved queries with that change.

@hughhhh hughhhh merged commit 86ce440 into apache:master Jun 20, 2023
45 checks passed
@hughhhh hughhhh deleted the jack/revert-to-old-saved-query-endpoint-temporarily branch June 20, 2023 17:57
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Jun 21, 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 8, 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:2023.25 size/XS 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants