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(explore): expired form data for SQL Lab queries #21430

Closed
wants to merge 1 commit into from

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Sep 9, 2022

SUMMARY

#19981 added the ability for Explore to fallback to default Explore form state (based on chart id or datasource id) had cached form data expires. But this feature is not working for Explore from SQL Lab---because of inconsistent URL parameter names. The /explore API expects dataset_id=xxx, but SQL Lab page added datasource_id=xxx.

This PR fixes this issue and added some backward compatibility so that both datasource_id and dataset_id works.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before

When visiting Explore from SQL Lab, You will get missing_datasource if your explore form data has expired.

image

After

Explore should load as long as a valid dataset_id is provided

image

TESTING INSTRUCTIONS

  1. Open Explore from SQL Lab query results
  2. Change the form_data_key to an invalid string to simulate expired form data key. For example: http://localhost:9000/explore/?form_data_key=invalid&datasource_id=45&datasource_type=query
  3. The Explore page should still load.

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

@ktmud ktmud changed the title Missing form data fix(explore): expired form data for SQL Lab queries Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants