Closed brianphillips closed 4 months ago
This actually appears to be intentionally coded this way over in the backend plugin: https://github.com/PagerDuty/backstage-plugin-backend/blob/main/src/apis/pagerduty.ts#L392-L394
Apologies for not posting in the correct repo. Can you help me understand the intent behind filtering the list of oncalls based on the first one in the original (unsorted) response? Perhaps the intent is to grab all users at the first escalation level of the sorted list of oncall users?
Hello @brianphillips! Thanks for opening this issue.
The old version of the plugin owned by Backstage was showing all users from all escalation levels under the on-call
section. After collecting feedback from several plugin users this didn't seem to align with their expectation as all levels after level 1 are not necessarily on-call. They are escalation paths.
Still, the result on your first screenshot would only be correct according to our logic if Doug was the engineer currently on-call for Ops OCC
on-call schedule and it is not.
By the way, one thing I'm considering to do to support both behaviours our users are requesting is to have a plugin flag that allows admins to define wether you just show the engineers on-call for escalation level 1 (default) or all escalation levels. Would that be a possible solution for your use case?
Adding some color here, I'm experiencing the same behavior that Brian is.
We have an escalation policy that is in this order:
We're finding that the "Team Manager" is currently being shown as the only person in the list, not the person currently scheduled as "Primary On Call"
Thanks for sharing @alecjacobs5401. I'll look into it and fix it ASAP.
By the way, one thing I'm considering to do to support both behaviours our users are requesting is to have a plugin flag that allows admins to define wether you just show the engineers on-call for escalation level 1 (default) or all escalation levels. Would that be a possible solution for your use case?
I think that would be potentially useful but I think in our org, we'd be fine with just showing the first person that's on-call (as long as its actually the first person that's on-call :slightly_smiling_face: )
@brianphillips, @alecjacobs5401 which version of the frontend, backend and common plugin packages are you using?
I'm unable to replicate this locally in my environment. It's only returning the user/users on escalation level 1.
@t1agob I was using the following versions before my PR was merged:
@pagerduty/backstage-plugin-common@0.1.1
@pagerduty/backstage-plugin@0.9.2
@pagerduty/backstage-plugin-backend@0.4.3
The issue is when the array of oncalls
returned from the PagerDuty API are not returned in order, the list of of on-call individuals would be filter to only those at the same escalation_level
as the first on-call individual that happened to be returned in the original response.
Upgrading to @pagerduty/backstage-plugin-backend@0.4.4
fixes the issue for me. I'm going to close this issue.
Describe the bug When migrating from the old version of the plugin (from
@backstage/plugin-pagerduty
to@pagerduty/backstage-plugin
and friends), the list of "On Call" individuals is incorrect. Only a single entry is shown and that individual is not the first level of on call in the relevant escalation policy (at least in the applications I've spot checked after the upgrade in my local environment).To Reproduce Steps to reproduce the behavior:
pagerduty.com/integration-key
annotationExpected behavior List of individuals that are on call should match
Screenshots
Here you can see that the individual on the fifth level of the escalation policy is the only entry shown:![image](https://github.com/PagerDuty/backstage-plugin/assets/28457/d8563912-08d5-4c46-8a56-9b4dbb9f8759)
With the old version of the plugin, we correctly see all levels of the escalation policy:![image](https://github.com/PagerDuty/backstage-plugin/assets/28457/1b7091ed-93a4-42dc-8b7a-f0fd4940c028)
Desktop (please complete the following information):
Additional context
I have tried using the API token-based auth (which we were using with the old version of the plugin) as well as the OAuth version and am observing identical results