-
Notifications
You must be signed in to change notification settings - Fork 291
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
Can't configure oncall with zvonok with helm #2520
Comments
My colleagues found similar issue #2323 |
Hi, the issue arises when the environment variable PHONE_PROVIDER has an invalid or null value (default value is twilio), resulting in a KeyError exception here |
Yes. I reviewed code and uderstand it. I think that this wrong behavior. I could be wrong in PHONE_PROVIDER and what i'll do? I must have other way change this variable (with os.getenv) or maybe send me error about wrong phone_provider without save. |
General problem this issue is we can't change PHONE_PROVIDER after misstake. We get 500 status code and it's wrong. My point of view that we can't choose wrong provider. We can choose provider from avaliable. Also we can configure this is parameters with os.getenv |
I made a PR that fixes this issue |
@sreway Thx for contributed. I'll try it and give you feed back. |
Sorry, I don't have any ideas. When you add an environment variable in a Helm chart, it should be picked up by the deployed application if it is properly configured to read environment variables. |
hmm, okay. I'll try on weekend again. thx. Also we are waiting to approve the pull request :) |
UPD: If you change PHONE_PROVIDER in UI, it value will be add to tablespace base_livesetting and if you want change it with env you will can't. I think it's not normal, cos env need have high priority and if we change env this value coul'd be delete from this table. I resolve this problem with delete row in database, after my env was apply. @sreway what do u think? |
It seems to me that it is functioning correctly. If you want to reset the value to the default value set by the environment variable, you can click on the "Reset to default" button. |
Yes, you right but if we stay without value check we can't reset to default. |
# What this PR does Sets a default value for the PHONE_PROVIDER setting and replaces the value of PHONE_PROVIDER with this default value if it is not valid. ## Which issue(s) this PR fixes - [#2520](#2520) - [#2323](#2323) ## Checklist - [ ] Unit, integration, and e2e (if applicable) tests updated - [ ] Documentation added (or `pr:no public docs` PR label added if not required) - [ ] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not required) --------- Co-authored-by: Innokentii Konstantinov <innokenty.konstantinov@grafana.com> Co-authored-by: Joey Orlando <joseph.t.orlando@gmail.com> Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
Won't close issue cos i want configure helm for configure zvonok |
What went wrong?
What happened:
What did you expect to happen:
How do we reproduce it?
│ return _providers[live_settings.PHONE_PROVIDER] │
│ ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │
│ KeyError: 'test'
Grafana OnCall Version
v1.3.9
Product Area
Alert Flow & Configuration, Helm
Grafana OnCall Platform?
Kubernetes
The text was updated successfully, but these errors were encountered: