PagerDuty / backstage-plugin

PagerDuty plugin for Backstage
https://pagerduty.github.io/backstage-plugin-docs/index.html
Apache License 2.0
21 stars 5 forks source link

Updating to 0.10 or newer can't find the service #92

Closed jcarres-mdsol closed 2 months ago

jcarres-mdsol commented 2 months ago

Describe the bug

After updating from 0.9.3 to newer versions (0.10 , 0.11) the widget can not find the service anymore.

In 0.9.3 I see these calls in the backend

GET /api/pagerduty/services/ GET /api/pagerduty/oncall-users?escalation_policy_ids[]= GET /api/pagerduty/services//incidents

They return 304 and work

With 0.10 I see

GET /api/pagerduty/services/ 304 GET /api/pagerduty/services//standards 404

In the UI the widget says the service was not found. But I do not think so, I think it is picking the 404 of the standards. The standards were not found but well, I do not care about standards anyways.

t1agob commented 2 months ago

Thanks for reporting this @jcarres-mdsol! A few questions to help me identify the root cause.

  1. Which version of the backend are you using?
  2. Are you using the API token or OAuth?
  3. In your entity config file are you using integration-key, service-id or both?

In the requests you share I see that the service id is missing. eg. /api/pagerduty/services/[service-id]/incidents so it might be an issue extracting the service id from the entity configuration. Or have you removed them from the requests for security reasons?

hballangan-mdsol commented 2 months ago

@t1agob

  1. Backstage 1.23.4
  2. Api token
  3. app config contains:

    pagerDuty:
    apiToken: ${PAGERDUTY_TOKEN}

Each component factbook has pagerduty.com/service-id: PPPPPP under annotations

t1agob commented 2 months ago

Thanks @hballangan-mdsol! Which version of @pagerduty/backstage-plugin-backend and @pagerduty/backstage-plugin-common are you using for your backend?

I just want to make sure I am using the same versions while trying to replicate the issue.

jcarres-mdsol commented 2 months ago

@t1agob Thank you because that was it. When I upgraded, I upgrade the pagerduty plugin to 0.10 meaning the UI plugin But I did not touch the backend or common. Now I've moved them to the latest version and it works perfectly. Thanks!

I'm going to close this now, if anything maybe needs to be clear that one should not forget about @pagerduty/backstage-plugin-backend and @pagerduty/backstage-plugin-common

t1agob commented 2 months ago

Perfect! Totally agree with your feedback. Our recommendation is to always upgrade all packages to the latest version if possible.

I'll make it clear on the documentation for the next releases if there are specific dependencies between frontend and backend components.