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

Grafana on call daily shift on time zone != UTC doesn't work #1330

Closed
afreyermuth98 opened this issue Feb 1, 2024 · 1 comment
Closed

Grafana on call daily shift on time zone != UTC doesn't work #1330

afreyermuth98 opened this issue Feb 1, 2024 · 1 comment

Comments

@afreyermuth98
Copy link
Contributor

afreyermuth98 commented Feb 1, 2024

Terraform Version

  • Terraform: 1.5.7
  • Terraform Grafana Provider: 2.8.1
  • Grafana: 10.3.1

Affected Resource(s)

Please list the resources as a list, for example:

  • grafana_oncall_on_call_shift

Terraform Configuration Files

resource "grafana_oncall_schedule" "schedule" {
  provider         = grafana.oncall
  name             = "my schedule"
  type             = "calendar"
  time_zone        = "Europe/Paris"
  team_id          = data.grafana_oncall_team.team.id # To refer
  shifts = [
    grafana_oncall_on_call_shift.shift.id
  ]
  slack {
    channel_id    = data.grafana_oncall_slack_channel.grafana_oncall_slack_channel.id
    user_group_id = data.grafana_oncall_user_group.slack_user_group.i
  }
}

resource "grafana_oncall_on_call_shift" "shift" {
  provider      = grafana.oncall
  name          = "test shift"
  type          = "rolling_users"
  start         = "2024-01-01T08:00:00"
  duration      = 60 * 60 * 10 # 10 hours
  frequency     = "daily"
  interval      = 1
  by_day        = ["MO", "TU", "WE", "TH", "FR"]
  week_start    = "MO"
  rolling_users = [
    [
      "USER_1"
    ],
    [
      "USER_2"
    ]
  ],
  time_zone     = "Europe/Paris"
}

Expected Behavior

Each of the user have a shift rotation, USER1 on monday, USER2 on tuesday, USER1 on wednesday etc ...

Actual Behavior

The 2 users have a shift every day : USER1 & USER2 on monday, USER1 & USER2 on tuesday etc ...

Steps to Reproduce

  1. terraform apply

Important Factoids

This works when I put time_zoed = "UTC" inside the grafana_oncall_on_call_shift and I get no issues using "weekly" frequency

@julienduchesne
Copy link
Member

This seems to be a bug in the API (or UI). UTC works, but so does America/Montreal and America/Los_Angeles and the payload looks to be the same between those and Europe timezone shifts. Can you open an issue here: https://github.com/grafana/oncall/issues?

@julienduchesne julienduchesne closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants