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

Config page: Config persists, breaking DS, but I never hit "Save & Test" #109

Open
samjewell opened this issue Dec 5, 2024 · 1 comment
Labels

Comments

@samjewell
Copy link

What happened:
I was on the Datasource config page, viewing the data there in order to search a config-as-code repo to see if it was configured there (and how). Turns out it was configured through the UI, but still I wanted to see and understand the configuration.

I started clicking around to understand how else it might have been configured, and to give myself more clues as to things like:

  • Where in AWS Console I could find the relevant resources that this DS points to, and
  • What other databases / tables / columns of data I might find, or be able to interact with.

At some point I:

  • Edited the Access Key ID and Secret Access Key fields, which cleared our the "Configured" value in the UI and replaced it with an empty text field for each
  • Then clicked on the Default region picker.

As soon as I did this, the edits were persisted 💔, and my datasource became completely broken, along with all dashboards powered by this datasource. I never hit Save & Test.

We ended up triggering an incident locally in response to this, as the dashboard which became broken is an important one for our org.

What you expected to happen:

The datasource configuration should NEVER be updated as long as I never hit the Save & Test button

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

See it reproduced in this video:
https://github.com/user-attachments/assets/7e2e083f-f5d4-4100-b3e7-ce44c327d7b8

Screenshots

See video above

Anything else we need to know?:

Environment:

  • Grafana version: GrafanaCloud Steady
  • Plugin version: Athena 2.17.5
  • OS Grafana is installed on:
  • User OS & Browser: Chrome, MacOS
  • Others:
@idastambuk
Copy link
Contributor

idastambuk commented Dec 5, 2024

I think the problem isn't the default region, but clicking the "Data source" select.
The reason for this is that we save the form before we fetch the databases/catalogues, since we need the info from the auth part (access, secret keys, region) in order to fetch that data.
Not sure if there's a simple solution here. I see that there IS an error popup when you open the dropdown with "No creds" error, so the user would need to ignore the error message
I guess a possible solution would be to rewrite the form so it sends all the options to the backend along with the resource call. This way the user would still get the error, but the datasource wouldn't be saved.

The bug happens in both Redshift and Athena

@idastambuk idastambuk transferred this issue from grafana/athena-datasource Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Next
Development

No branches or pull requests

2 participants