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(sqllab): prev shema/table options remained on fail #29638

Merged

Conversation

justinpark
Copy link
Member

SUMMARY

Due to the difference between the data of the RDK query and currentData, an issue occurred in SQL Lab where, instead of showing an empty selection due to (permission) errors, the schema and table selector allowed the selection of previous database or schema options.

  data?: T // The latest returned result regardless of hook arg, if present
  currentData?: T // The latest returned result for the current hook arg, if present

As a result, it was possible to combine schema and table selections that do not actually exist, causing errors and potentially confusing users.
This commit addresses these issues by changing to currentData, ensuring that only results existing in the strictly selected database and schema are displayed.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

before--using-current-data.mov

After:

after--using-current-data.mov

TESTING INSTRUCTIONS

Select a db/schema/tables in Sql Lab page
Choose a db that doesn't allow to access the schemas
See the schema selection remained or not after db selection changed

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

@dosubot dosubot bot added the sqllab Namespace | Anything related to the SQL Lab label Jul 18, 2024
@@ -272,7 +272,6 @@ test('should display options in order of the api response', async () => {
});

test('Should fetch the search keyword when total count exceeds initial options', async () => {
fetchMock.reset();
Copy link
Member Author

Choose a reason for hiding this comment

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

@justinpark justinpark merged commit 5539f87 into apache:master Jul 19, 2024
34 checks passed
@sadpandajoe
Copy link
Member

@supersetbot label 4.1

@github-actions github-actions bot added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Jul 30, 2024
sadpandajoe pushed a commit that referenced this pull request Aug 13, 2024
@justinpark
Copy link
Member Author

@michael-s-molina Please add this hotfix on 4.0 too.

@michael-s-molina michael-s-molina added the v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch label Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M sqllab Namespace | Anything related to the SQL Lab v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants