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

fix(auth): pass GRAFANA_TOKEN env variable on Grafana initialization #19

Closed
wants to merge 2 commits into from

Conversation

jl2397
Copy link
Contributor

@jl2397 jl2397 commented Sep 25, 2024

When the Grafana class is initialized in grafana.py, there is only a check for the "url" field in the parameters. If the GRAFANA_TOKEN env variable is set, the token is never passed to the GrafanaApi client and therefore results in a GrafanaUnauthorizedError when making requests using grafana_client. This adds a credential field to the from_url call and populates it with the GRAFANA_TOKEN env variable.

Copy link

codecov bot commented Sep 26, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@amotl
Copy link
Contributor

amotl commented Oct 3, 2024

Thank you very much for your contribution. I've converged it into GH-20, adjusting slightly for additional code formatting.

NB: poe format would have solved it well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants