PagerDuty / backstage-plugin-backend

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

Syncing issue: services lose their Pagerduty integration keys #92

Open alpinweis opened 1 month ago

alpinweis commented 1 month ago

I'm seeing an issue in my backstage instance. My backstage services are all defined in yaml files in a Github repo. Most of them have the annotation pagerduty.com/integration-key. For a number of services that annotation does not show up when I click on Inspect Entity even though it's in the source yaml file when backstage loads the data, and as a result the PagerDuty card does not show up for these services. For other services I noticed they now list the annotation that I dont have in the service yaml files: pagerduty.com/service-id. I suspect it was pushed/added by PagerDuty? I suspect this is all due to changes in the PagerDuty plugin configuration sync settings introduced by my recent upgrade of the Pagerduty plugin.

Currently I have the following versions installed:

@pagerduty/backstage-plugin 0.15.1
@pagerduty/backstage-plugin-backend 0.9.1
@pagerduty/backstage-plugin-common  0.2.1
@pagerduty/backstage-plugin-entity-processor    0.3.1

I upgraded from the following versions:

@pagerduty/backstage-plugin 0.14.1
@pagerduty/backstage-plugin-backend 0.8.2
@pagerduty/backstage-plugin-common  0.2.0
@pagerduty/backstage-plugin-entity-processor    0.2.1

My question is: is there a way to restore it back to the state when backstage services use the integration keys as defined in their yaml files and not the ones that might have been pushed by PagerDuty?

Also, how do I un-map all services and then let it re-build the map using the integration keys defined in the yaml files without touching all services pointing to the same PD service, and then keep it running with sync disabled?

Update: I suspect this is happening because I have multiple services in backstage that are associated with a single PagerDuty service. The unexpected side effect of having the PagerDuty mapping run even with syncing set to disabled is that only one of such services preserves the pagerduty.com/integration-key (and gets pagerduty.com/service-id added to it) while the rest of the services lose it and thus can't show the PagerDuty card. This is wrong.