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

add the x-disable-provenance header for create_alert_rule #211

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

yg265
Copy link
Contributor

@yg265 yg265 commented Apr 26, 2023

Currently the create_alert_rule method provisions the alerting resources using the Alerting Provisioning HTTP API. Could we add the x-disable-provenance header to the requests when creating alerts rules in the API.

https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/

@acjohnson
Copy link
Collaborator

I think this seems reasonable, can you also explain the switch from StringIO to BytesIO?

@yg265
Copy link
Contributor Author

yg265 commented Apr 26, 2023

According to python docs, from StringIO import StringIO is no longer supported in python3. https://docs.python.org/3.0/whatsnew/3.0.html
io.StringIO or io.BytesIO are suggested to be used. In this case, it seems that StringIO doesn't support bytes from s3_data_raw.read().

@acjohnson acjohnson merged commit 4a85d57 into ysde:master Apr 26, 2023
4 checks passed
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.

None yet

2 participants