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

Escalation chains page does not accurately reflect schedules in the "Select Schedule" dropdown. #3966

Closed
tleecsm opened this issue Feb 27, 2024 · 0 comments
Assignees
Labels

Comments

@tleecsm
Copy link

tleecsm commented Feb 27, 2024

What went wrong?

What happened:
One of our engineers was looking over the escalation chains page, and noticed a team had an important notification escalation policy for a schedule, but the schedule was blank.
image
This is obviously a problem and lead to a bit of panic. We recreated the escalation chain and added the proper schedule to the escalation policy. However, when rereloaded the page, we noticed the policy had been cleared again (and the dropdown was blank)! At this point I suspected a front-end bug, and I checked the API. The API correctly reflected that the schedule was attached to the Escalation Policy.

        {
            "position": 5,
            "id": "E37AA2CDUKXSL",
            "escalation_chain_id": "FWP7IY35GGABP",
            "type": "notify_on_call_from_schedule",
            "notify_on_call_from_schedule": "S9279VTIW1L8P",
            "important": true
        },

I poked through our other escalation chains, and I noticed some of them had schedules that were loading in properly, and some were blank. I started snooping around the network requests that the UI was making, and I noticed whenever a new escalation chain was loaded, there was a call to {api-proxy-url}/grafana-oncall-app/api/internal/v1/schedules/?page=1&search=. This returns the first of several pages of schedules our organization has in the API. Regardless of which escalation chain I clicked on, this was the only event I saw mentioning schedules. I noticed that any team's escalation that had a schedule returned on this Page 1 API call, had their schedule load properly in the UI.
image

Any team, like the first team shown, with a schedule not on the first page, had blank dropdown boxes for their schedules.
This is obviously confusing, and will continue to cause issues for our organization until it is fixed.

What did you expect to happen:
The UI for Escalation chains NEEDS to reflect the data returned by the API. If we have a schedule set for an escalation policy, that needs to be visible within the UI.

How do we reproduce it?

  1. Create enough schedules to have multiple pages returned by the schedules API endpoint.
  2. Query the schedules endpoint and find a schedule on page 1. schedules/?page=1&search=
  3. Create an escalation chain with a policy that includes this schedule. Reload the page. The schedule should properly display.
  4. Query the schedules endpoint and find a schedule on page 2. schedules/?page=2&search=
  5. Create an escalation chain with a policy that includes this schedule. Reload the page. The schedule should not display and the dropdown should be blank.

Grafana OnCall Version

r332-v1.3.106

Product Area

Schedules

Grafana OnCall Platform?

I use Grafana Cloud

User's Browser?

Several versions of Google Chrome and Firefox

Anything else to add?

If necessary, a GrafanaLabs engineer can use our Grafana Cloud instance for troubleshooting/debugging. If that is necessary, please respond to the issue and let me know.

@tleecsm tleecsm added the bug Something isn't working label Feb 27, 2024
@brojd brojd self-assigned this Feb 28, 2024
github-merge-queue bot pushed a commit that referenced this issue Feb 28, 2024
# What this PR does

- Fetch selected schedule on mount which is not done as soon as schedule
is not on the first page
- Add missing observer decorator
- Fix incorrect HTTP calls when creating integrations
https://raintank-corp.slack.com/archives/C04JCU51NF8/p1708703429829919

## Which issue(s) this PR fixes

#3966

## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
github-merge-queue bot pushed a commit that referenced this issue Feb 29, 2024
# What this PR does

- fix showing selected value if it's not retrieved by get items request

## Which issue(s) this PR fixes
#3966


## Checklist

- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] `CHANGELOG.md` updated (or `pr:no changelog` PR label added if not
required)
@brojd brojd closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants