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

Database selector in the query editor doesn't show options after clicking on it #291

Closed
kevinwcyu opened this issue Oct 18, 2023 · 2 comments · Fixed by #437
Closed

Database selector in the query editor doesn't show options after clicking on it #291

kevinwcyu opened this issue Oct 18, 2023 · 2 comments · Fixed by #437
Assignees
Labels

Comments

@kevinwcyu
Copy link
Contributor

What happened:

I noticed when updating e2e tests that the database selector doesn't show options unless it's opened, closed, and then opened again. Looks like it only happens in Grafana v10+. I didn't notice a problem with the Redshift datasource with uses the same ResourceSelector component.

Screen.Recording.2023-10-18.at.9.39.49.AM.mov

What you expected to happen:

Here's how it was working when running in Grafana v9.4.7

Screen.Recording.2023-10-18.at.9.46.53.AM.mov

How to reproduce it (as minimally and precisely as possible):

  1. Run Athena in Grafana v10+
  2. Add a panel with an Athena DS and click the database selector
  3. Click away from the database selector to close it
  4. Click the database selector again and now the options should appear.

Anything else we need to know?:

Environment:

  • Grafana version: 10+
  • Plugin version: 2.12.0
@kevinwcyu kevinwcyu added type/bug Something isn't working datasource/Athena labels Oct 18, 2023
@iwysiu iwysiu moved this from Incoming to Backlog in AWS Datasources Oct 18, 2023
@iwysiu iwysiu moved this from Backlog to Next in AWS Datasources Aug 23, 2024
@idastambuk idastambuk self-assigned this Sep 25, 2024
@nmarrs
Copy link
Contributor

nmarrs commented Oct 3, 2024

Upon closer review, it appears that this issue is impacting more than just the "database" selector but seems to be an issue for "region", "data source", "database", possibly "table". "column" seems to be the only selector that consistently works as expected

Screen.Recording.2024-10-03.at.3.40.28.PM.mov

@nmarrs nmarrs self-assigned this Oct 3, 2024
@idastambuk idastambuk removed their assignment Oct 4, 2024
@nmarrs
Copy link
Contributor

nmarrs commented Oct 4, 2024

My best understanding of where this issue is that react state was being updated but because of the array reference was not being rewritten the component was not re-rendering. In the case of redshift it appears that the state is being updated + modified into a new object as part of the fetch which is probably why the query form component is being rerendered and options are showing up as expected.

@github-project-automation github-project-automation bot moved this from In Progress to Done in AWS Datasources Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants