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

Pagerduty Migration failed in migrate mode #2917

Closed
pramodh-b opened this issue Aug 30, 2023 · 5 comments
Closed

Pagerduty Migration failed in migrate mode #2917

pramodh-b opened this issue Aug 30, 2023 · 5 comments
Assignees
Labels
bug Something isn't working part:helm/kubernetes/docker

Comments

@pramodh-b
Copy link

What went wrong?

What happened:

  • The migration is failing in migrate mode, I used the plan mode 1st and, and the output details were correct. But in migrate mode it failed and below is the error.

File "/app/migrator/oncall_api_client.py", line 46, in api_call
raise requests.exceptions.HTTPError(
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://URL/api/v1/personal_notification_rules, response payload JSON: {'type': 'Invalid type'}

What did you expect to happen:
I was expecting a successful migration in migrate mode.

How do we reproduce it?

By running Pager duty migrator in migrate mode we can reproduce this error

Grafana OnCall Version

1.3.27

Product Area

Other

Grafana OnCall Platform?

Kubernetes

User's Browser?

No response

Anything else to add?

Are you using OSS or Grafana Cloud?
Ans: OSS
What’s the version of OnCall on your instance?
Ans: Onall plugin version: 1.3.27, Grafana version: 9.5.3
Which types of user notification rules are used on your PD instance? (e.g. email, SMS, etc.)
Ans: Email, Call, SMS, App notification

Used helm package manager to install oncall and configure.
helm install my-oncall grafana/oncall --version 1.3.27

@pramodh-b pramodh-b added the bug Something isn't working label Aug 30, 2023
@vstpme vstpme self-assigned this Aug 30, 2023
@vstpme
Copy link
Member

vstpme commented Aug 31, 2023

👋 @pramodh-b could you please try setting .Values.oncall.smtp.enabled to true and running the migration again and see if it helps?

@pramodh-b
Copy link
Author

Hi @vadimkerr its still same issue.

@vstpme
Copy link
Member

vstpme commented Aug 31, 2023

I'm not able to reproduce the issue when passing --set oncall.smtp.enabled=true to Helm. Maybe some values are not getting propagated on your deployment @pramodh-b?

@pramodh-b
Copy link
Author

As you suggested changes SMTP values to true and provided the details. Now there is another error with migrate mode in the Migrating schedule step. below is the error.

▶ Migrating schedules...
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/app/migrator/main.py", line 184, in
main()
File "/app/migrator/main.py", line 157, in main
migrate_schedule(schedule, user_id_map)
File "/app/migrator/resources/schedules.py", line 45, in migrate_schedule
"ical_url_primary": schedule["http_cal_url"],
~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'http_cal_url'

@vstpme vstpme closed this as completed in 017b22b Sep 6, 2023
@vstpme
Copy link
Member

vstpme commented Sep 6, 2023

The issue should be fixed in this PR by setting oncall.smtp.enabled=true by default.

@pramodh-b regarding the http_cal_url error, please make sure you're using a User Token REST API Key and not a General Access REST API Key as per the instruction. If that doesn't help, feel free to open a new issue here in the GH repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working part:helm/kubernetes/docker
Projects
None yet
Development

No branches or pull requests

2 participants