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

Remove invalid database names from dropdown suggestions #24

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

siddharthvp
Copy link
Collaborator

This is done by only including dbs against which successful queries have been run in the past.

Also add a Cache-Control header is response so the result is cached in the browser for one hour or till a hard reload is done.

Bug: T289943

@siddharthvp
Copy link
Collaborator Author

Here is the cli translation of the sqlalchemy query:

SELECT DISTINCT query_database FROM query_revision
JOIN query_run ON query_revision.id = query_rev_id
WHERE extra_info NOT LIKE "{\"error%"
AND query_database IS NOT NULL

@siddharthvp siddharthvp force-pushed the invalid-suggestions branch 2 times, most recently from 7a2dec8 to 11b644c Compare October 7, 2023 10:51
This is done by only including dbs against which successful queries have been run in the past.

Also add a Cache-Control header is response so the result is cached in the browser for one hour or till a hard reload is done.

Bug: T289943
Copy link
Collaborator

@audiodude audiodude left a comment

Choose a reason for hiding this comment

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

LGTM

@siddharthvp siddharthvp merged commit cdc6c46 into main Oct 12, 2023
1 check passed
@siddharthvp siddharthvp deleted the invalid-suggestions branch October 12, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants