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

instanceProvider's NeedsUpdate returns false positives in some circumstances #1098

Open
njvrzm opened this issue Sep 30, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@njvrzm
Copy link
Contributor

njvrzm commented Sep 30, 2024

What happened:
When mulitple grafana instances talk to the same plugin process, any time two successive requests come from different instances a new datasource is created. The ProxyOpts for each host are different, so when NeedsUpdated checks to see if the incoming GrafanCfg is different from the cached one, it always returns true if the current request is coming from a different grafana instance than previous request. This happens even if the datasource does not use a proxy.

What you expected to happen:
A datasource that doesn't use ProxyOpts should not be considered to need updating if those ProxyOpts change.

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

  • Create a datasource in dev that is enabled for the apiserver and logs something in its InstanceFactoryFunc. The Amazon Athena datasource is one example.
  • Make multiple requests to the datasource
  • See in the logs that the factory function is being called repeatedly even though no real config changes have been made.
@njvrzm njvrzm added the bug Something isn't working label Sep 30, 2024
@njvrzm njvrzm self-assigned this Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Status: 📬 Triage
Development

No branches or pull requests

1 participant