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 saving new sql lab queries #8351

Merged
merged 2 commits into from
Oct 4, 2019

Conversation

suddjian
Copy link
Member

@suddjian suddjian commented Oct 4, 2019

CATEGORY

Choose one

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

SUMMARY

This fixes an issue introduced in #8298 as reported by @graceguo-supercat. Due to a lack of FAB know-how on my part, the id field was required when POSTing a saved query, which prevents any new saved queries from being created.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

Tested locally

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

@graceguo-supercat
Copy link

@suddjian Save query feature works good. but i have another question: it seems query's label is not carried-over to the Save Query modal, please see my screenshot.
WWVlLtwtPL

I saw this problem in the last commit (so it's not introduced from this PR). it will be great improvement if you can have this fixed as well.

@suddjian
Copy link
Member Author

suddjian commented Oct 4, 2019

That's certainly an interesting bug, I'll see what I can do

@suddjian
Copy link
Member Author

suddjian commented Oct 4, 2019

@graceguo-supercat I've done some investigation, and this bug seems to be connected to a larger issue where null values are being returned from the backend as "None".

I have pinned down exactly where it affects this part of the Saved Query feature: In the response to the request GET savedqueryviewapi/api/get/{id}, the query.description is set to "None". The SaveQuery component is being provided with either the query.description or query.title, so it displays the description which is "None".

I'm not sure how to best deal with this problem, though I have a couple very hack-y ideas. It should probably be reported as its own bug if it isn't already, as it's probably affecting other parts of the app that should be receiving nulls.

@graceguo-supercat
Copy link

graceguo-supercat commented Oct 4, 2019

fair. I agree to report the missing label as a separate issue.

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

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

LGTM

@graceguo-supercat graceguo-supercat merged commit b093406 into apache:master Oct 4, 2019
@suddjian suddjian deleted the fix-save-query branch October 5, 2019 00:10
serenajiang pushed a commit to airbnb/superset-fork that referenced this pull request Oct 9, 2019
* fix saving new sql lab queries

* allow freshly saved queries to be updated immediately
@rubypollev
Copy link

Still seeing this issue in 0.35.0. Anyone else?

@suddjian
Copy link
Member Author

@rubypollev are you referring to the label not being carried over? I don't think there's been an attempt to fix that, yet.

@rubypollev
Copy link

Ah, okay! Is there an issue I can subscribe to @suddjian?

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.35.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/S 🚢 0.35.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants