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

Cannot read properties of undefined (reading 'name') after updating backstage #118

Open
prasoon-pxc opened this issue Jan 25, 2023 · 7 comments

Comments

@prasoon-pxc
Copy link

I have updated the backstage from 1.7.1 to 1.10.1 , after updating the backstage , opsgenie plugin stop working , plugin with components page is still working i.e I am able to show alert or "who-is-on-call" on specific component page but standalone page for this plugin is giving error.

PF
image

I have checked and found that opsgenie plugin gets updated from 0.6.1 to 0.6.4

  • output of yarn backstage-cli info
yarn run v1.22.19
$ /home/il58d0/smb/backstage-conf-repo/backstage-conf-repo-original/node_modules/.bin/backstage-cli info
OS:   Linux 5.14.0-1055-oem - linux/x64
node: v16.14.0
yarn: 1.22.19
cli:  0.22.1 (installed)
backstage:  1.10.1

Dependencies:
  @backstage/app-defaults                          1.1.0
  @backstage/backend-app-api                       0.3.1
  @backstage/backend-common                        0.17.0, 0.18.1
  @backstage/backend-plugin-api                    0.3.1
  @backstage/backend-tasks                         0.4.2
  @backstage/backend-test-utils                    0.1.33
  @backstage/catalog-client                        1.3.0
  @backstage/catalog-model                         1.1.5
  @backstage/cli-common                            0.1.11
  @backstage/cli                                   0.22.1
  @backstage/config-loader                         1.1.8
  @backstage/config                                1.0.6
  @backstage/core-app-api                          1.4.0
  @backstage/core-components                       0.12.3
  @backstage/core-plugin-api                       1.3.0
  @backstage/errors                                1.1.4
  @backstage/integration-aws-node                  0.1.1
  @backstage/integration-react                     1.1.9
  @backstage/integration                           1.4.2
  @backstage/plugin-api-docs                       0.8.14
  @backstage/plugin-app-backend                    0.3.41
  @backstage/plugin-auth-backend                   0.17.4
  @backstage/plugin-auth-node                      0.2.10
  @backstage/plugin-bazaar-backend                 0.2.4
  @backstage/plugin-bazaar                         0.2.3
  @backstage/plugin-catalog-backend-module-github  0.2.4
  @backstage/plugin-catalog-backend                1.7.1
  @backstage/plugin-catalog-common                 1.0.10
  @backstage/plugin-catalog-graph                  0.2.26
  @backstage/plugin-catalog-import                 0.9.4
  @backstage/plugin-catalog-node                   1.3.2
  @backstage/plugin-catalog-react                  1.2.4
  @backstage/plugin-catalog                        1.7.2
  @backstage/plugin-events-node                    0.2.2
  @backstage/plugin-github-actions                 0.5.14
  @backstage/plugin-home                           0.4.30
  @backstage/plugin-org                            0.6.4
  @backstage/plugin-permission-common              0.7.3
  @backstage/plugin-permission-node                0.7.4
  @backstage/plugin-permission-react               0.4.9
  @backstage/plugin-playlist-backend               0.2.4
  @backstage/plugin-playlist-common                0.1.4
  @backstage/plugin-playlist                       0.1.5
  @backstage/plugin-proxy-backend                  0.2.35
  @backstage/plugin-scaffolder-backend             1.10.1
  @backstage/plugin-scaffolder-common              1.2.4
  @backstage/plugin-scaffolder-react               1.0.1
  @backstage/plugin-scaffolder                     1.10.1
  @backstage/plugin-search-backend-module-pg       0.5.2
  @backstage/plugin-search-backend-node            1.1.2
  @backstage/plugin-search-backend                 1.2.2
  @backstage/plugin-search-common                  1.2.1
  @backstage/plugin-search-react                   1.4.0
  @backstage/plugin-search                         1.0.7
  @backstage/plugin-shortcuts                      0.3.6
  @backstage/plugin-sonarqube-backend              0.1.6
  @backstage/plugin-sonarqube-react                0.1.1
  @backstage/plugin-sonarqube                      0.6.2
  @backstage/plugin-stack-overflow                 0.1.10
  @backstage/plugin-tech-radar                     0.6.0
  @backstage/plugin-techdocs-backend               1.5.2
  @backstage/plugin-techdocs-module-addons-contrib 1.0.9
  @backstage/plugin-techdocs-node                  1.4.5
  @backstage/plugin-techdocs-react                 1.1.2
  @backstage/plugin-techdocs                       1.4.3
  @backstage/plugin-todo-backend                   0.1.38
  @backstage/plugin-todo                           0.2.16
  @backstage/plugin-user-settings                  0.6.2
  @backstage/release-manifests                     0.0.8
  @backstage/test-utils                            1.2.4
  @backstage/theme                                 0.2.16
  @backstage/types                                 1.0.2
  @backstage/version-bridge                        1.0.3
Done in 0.80s.
@mattbarlow-sg
Copy link

I think the issue is related to this line:

const response = await this.fetch<SchedulesResponse>("/v2/schedules");

The response from Opsgenie does not include an ownerTeam on every Schedule. So the response should probably be filtered like this: return response.data.filter(schedule => schedule.ownerTeam);

@prasoon-pxc
Copy link
Author

thanks @mattbarlow-sg for your time , so this should be change in plugin side right? or I need to change it somewhere?

@mattbarlow-sg
Copy link

mattbarlow-sg commented Feb 2, 2023

@prasoon-pxc I believe a change needs to happen in this plugin to filter out schedules that don't have an owner team, because of the reference here.

When I curl the Opsgenie schedules API I can see in the response that not all schedules have ownerTeam.

However, I just started looking at this plugin yesterday, so I might be missing something.

@prasoon-pxc
Copy link
Author

@mattbarlow-sg thanks!!

@prasoon-pxc
Copy link
Author

Hi,
Do we have any chances to fix this?

@deeparavirdc
Copy link

deeparavirdc commented Oct 19, 2023

Facing the same issue - is there a solution for the above or a plan to rollout the fix mentioned ?

@deeparavirdc
Copy link

Have a PR up for review - #128. @K-Phoen could you please take a look ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants