grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.41k stars 272 forks source link

twilio phonenumber >12digits not usable #4134

Open daschick111 opened 5 months ago

daschick111 commented 5 months ago

What went wrong?

What happened:

What did you expect to happen:

How do we reproduce it?

  1. use a valid 13 digit phonenumber as twilio_number env var

Grafana OnCall Version

v1.3.114

Product Area

Other

Grafana OnCall Platform?

Kubernetes

User's Browser?

No response

Anything else to add?

No response

joeyorlando commented 4 months ago

Hi there @daschick111 👋 In which context are you seeing this error message? The UI? Backend logs?

Can you also provide the example format of the number you are trying to use? (feel free to "X" out a few of the last digits)

daschick111 commented 4 months ago

i got that one in the ui and it does not allow me to continue the number i used is: +3197010208XXX

teodosii commented 4 months ago

@daschick111 indeed the validation doesn't allow letters, only digits, maybe that should be revised. Is the X in your phone number meant to be 9 or is it just a placeholder for your numbers? If I then replace it with a number instead UI will allow it

daschick111 commented 4 months ago

No. I only X’d out the last digits in that comment. When I entered the number I had no letters in there

teodosii commented 4 months ago

@daschick111 Got it. I tried without the X, something like this +3197010526404 is totally valid on the UI (tested with latest version).

What version are you running?

The only validation for the phone number on the UI (on the backend it's validated by twilio) is to start with a + and to have between 8 and 15 digits (including the ends)

daschick111 commented 4 months ago

i am currently using 1.3.114, OpenSource

daschick111 commented 4 months ago

image

joeyorlando commented 4 months ago

thanks for the screenshot @daschick111, this is helpful. I'll take a deeper look into this

joeyorlando commented 4 months ago

how're you setting this @daschick111? via a helm chart? I'm not able to reproduce this locally. I've used the same number you provided and the validation passes.

If you're providing this value as an env variable in a helm chart, can you try wrapping it in quotes?

"'<your_number>'"
daschick111 commented 4 months ago

what i am doing is using terraform for my installation in azure aks i fire a helm_release resource with values like that:

    oncall:
      grafana.cloud.notifications.enabled: false
      twilio:
        accountSid: ${data.azurerm_key_vault_secret.twilio_account_sid.value}
        authToken: ${data.azurerm_key_vault_secret.twilio_auth_token.value}
        phoneNumber: ${data.azurerm_key_vault_secret.twilio_phonenumber.value}

the phonenumber is saved in an azure keyvault in this way: "" will post the outcome of your suggestion