-
Notifications
You must be signed in to change notification settings - Fork 107
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 idempotent issue in grafana_datasource provider #297
Fix idempotent issue in grafana_datasource provider #297
Conversation
e9bbb47
to
acd9222
Compare
I actually noded, that there are two fields (depending on the datasource)
so, the patch should be applied to the "password" field as well |
@joernott Good spot. I've did some manual testing on @tobias-urdin's change and it looked good. I'll see if I can add some acceptance tests for both types of datasource. |
This doesn't seem to work if |
@@ -63,6 +63,12 @@ def datasources | |||
|
|||
datasource = JSON.parse(response.body) | |||
|
|||
basic_auth_password = if datasource.key?('secureJsonData') && datasource['secureJsonData'].key?('basicAuthPassword') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
secureJsonData
is never part of the response. There's secureJsonFields
but this just returns booleans. See grafana/grafana#20274 (comment) :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use basic auth so I didn't verify that part, but that's bummer. We are using this PR internally until something can be figured out here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#301 might be that something. Still not much use for Grafana 9 users who need to configure prometheus basic auth or influxdb password, but if you're not using any auth, should remove the problem for you.
Closing in favor of #301 |
This fixes the idempotent issue mentioned in the issue.
Fixes #289