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

[code insights] GitHub workflow status badges returns 404 when displayed in Readme #1207

Open
wanisfahmyDE opened this issue Dec 19, 2023 · 11 comments
Assignees
Labels
kind/bug Something isn't working

Comments

@wanisfahmyDE
Copy link

When using the code insights plugin, especially the readme component, the GitHub workflow status badges are always returned 404. The GitHub repo is an internal repo under a GitHub Organization.

The entire readme content gets rendered successfully except for the badges.

worthy to note that the backend csp img-src configs includes allowing content from github.com in the app-config.yaml

Expected Behavior

The GitHub badges should be rendered correctly

Current Behavior

The readme card has some broken images and 404 is returned in the browser console

Steps to Reproduce

onboard a github repo to backstage that is of type internal.
the readme of this repo should have workflow status badges.
readme card badges doesn't get rendered.

Possible Solution

Context

Your Environment

currently using:
"@roadiehq/backstage-plugin-github-insights": "^2.3.21",

  @backstage/app-defaults                                          1.4.5
  @backstage/backend-app-api                                       0.5.8
  @backstage/backend-common                                        0.19.9
  @backstage/backend-dev-utils                                     0.1.2
  @backstage/backend-openapi-utils                                 0.1.0
  @backstage/backend-plugin-api                                    0.6.7
  @backstage/backend-tasks                                         0.5.12
  @backstage/catalog-client                                        1.4.6
  @backstage/catalog-model                                         1.4.3
  @backstage/cli-common                                            0.1.13
  @backstage/cli-node                                              0.2.0
  @backstage/cli                                                   0.24.0
  @backstage/config-loader                                         1.5.3
  @backstage/config                                                1.1.1
  @backstage/core-app-api                                          1.11.1
  @backstage/core-components                                       0.12.5, 0.13.8
  @backstage/core-plugin-api                                       1.8.0
  @backstage/dev-utils                                             1.0.24
  @backstage/e2e-test-utils                                        0.1.0
  @backstage/errors                                                1.2.3
  @backstage/eslint-plugin                                         0.1.3
  @backstage/frontend-plugin-api                                   0.3.0
  @backstage/integration-aws-node                                  0.1.8
  @backstage/integration-react                                     1.1.21
  @backstage/integration                                           1.7.2
  @backstage/plugin-adr-backend                                    0.4.4
  @backstage/plugin-adr-common                                     0.2.17
  @backstage/plugin-api-docs                                       0.10.1
  @backstage/plugin-app-backend                                    0.3.55
  @backstage/plugin-app-node                                       0.1.7
  @backstage/plugin-auth-backend-module-gcp-iap-provider           0.2.1
  @backstage/plugin-auth-backend-module-github-provider            0.1.4
  @backstage/plugin-auth-backend-module-gitlab-provider            0.1.4
  @backstage/plugin-auth-backend-module-google-provider            0.1.4
  @backstage/plugin-auth-backend-module-oauth2-provider            0.1.4
  @backstage/plugin-auth-backend                                   0.20.0
  @backstage/plugin-auth-node                                      0.2.19, 0.4.1
  @backstage/plugin-catalog-backend-module-github                  0.4.5
  @backstage/plugin-catalog-backend-module-scaffolder-entity-model 0.1.4
  @backstage/plugin-catalog-backend                                1.15.0
  @backstage/plugin-catalog-common                                 1.0.18
  @backstage/plugin-catalog-graph                                  0.3.1
  @backstage/plugin-catalog-import                                 0.10.3
  @backstage/plugin-catalog-node                                   1.5.0
  @backstage/plugin-catalog-react                                  1.9.1
  @backstage/plugin-catalog                                        1.15.1
  @backstage/plugin-devtools-backend                               0.2.4
  @backstage/plugin-devtools-common                                0.1.6
  @backstage/plugin-devtools                                       0.1.6
  @backstage/plugin-events-backend-module-github                   0.1.17
  @backstage/plugin-events-backend                                 0.2.16
  @backstage/plugin-events-node                                    0.2.16
  @backstage/plugin-explore-backend                                0.0.17
  @backstage/plugin-explore-common                                 0.0.2
  @backstage/plugin-explore-react                                  0.0.33
  @backstage/plugin-explore                                        0.4.13
  @backstage/plugin-github-actions                                 0.6.8
  @backstage/plugin-github-pull-requests-board                     0.1.21
  @backstage/plugin-home-react                                     0.1.5
  @backstage/plugin-home                                           0.5.11
  @backstage/plugin-org                                            0.6.17
  @backstage/plugin-permission-backend                             0.5.30
  @backstage/plugin-permission-common                              0.7.10
  @backstage/plugin-permission-node                                0.7.18
  @backstage/plugin-permission-react                               0.4.17
  @backstage/plugin-proxy-backend                                  0.4.5
  @backstage/plugin-scaffolder-backend                             1.19.1
  @backstage/plugin-scaffolder-common                              1.4.3
  @backstage/plugin-scaffolder-node                                0.2.8
  @backstage/plugin-scaffolder-react                               1.6.1
  @backstage/plugin-scaffolder                                     1.16.1
  @backstage/plugin-search-backend-module-catalog                  0.1.11
  @backstage/plugin-search-backend-module-explore                  0.1.11
  @backstage/plugin-search-backend-module-pg                       0.5.16
  @backstage/plugin-search-backend-module-techdocs                 0.1.11
  @backstage/plugin-search-backend-node                            1.2.11
  @backstage/plugin-search-backend                                 1.4.7
  @backstage/plugin-search-common                                  1.2.8
  @backstage/plugin-search-react                                   1.7.3
  @backstage/plugin-search                                         1.4.3
  @backstage/plugin-shortcuts                                      0.3.16
  @backstage/plugin-sonarqube-backend                              0.2.9
  @backstage/plugin-sonarqube-react                                0.1.10
  @backstage/plugin-sonarqube                                      0.7.9
  @backstage/plugin-tech-radar                                     0.6.10
  @backstage/plugin-techdocs-backend                               1.9.0
  @backstage/plugin-techdocs-module-addons-contrib                 1.1.2
  @backstage/plugin-techdocs-node                                  1.10.0
  @backstage/plugin-techdocs-react                                 1.1.13
  @backstage/plugin-techdocs                                       1.9.1
  @backstage/plugin-user-settings                                  0.7.13
  @backstage/release-manifests                                     0.0.11
  @backstage/test-utils                                            1.4.5
  @backstage/theme                                                 0.2.19, 0.4.4
  @backstage/types                                                 1.1.1
  @backstage/version-bridge                                        1.0.7
@wanisfahmyDE wanisfahmyDE added the kind/bug Something isn't working label Dec 19, 2023
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 17, 2024
@mhaley37
Copy link

We have noticed this has started happening as well using version 2.3.22. I haven't tried older versions to try to determine if this worked differently at some point, but plan on doing so

@github-actions github-actions bot removed the stale label Feb 21, 2024
@mhaley37
Copy link

To provide some more context of what it looks like is happening here:

First the badge is attempted to be retrieved via API ( far as I can tell, this API endpoint is invalid), and an Authorization header is sent (Figure #1), but it fails because the endpoint is bad (Figure #2)

Then the badge retrieval is attempted again not using the gh API, but rather just retrieving the image directly, and that fails (because there is no token / auth cookie maybe? (Figure #3). The repo in question in our is non-public.

image

@wanisfahmyDE
Copy link
Author

thanks for the detailed explanation @mhaley37! yea that's exactly what we're also facing.

It would be nice if someone from the maintainers have a look

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Apr 22, 2024
@andrewthauer
Copy link

This still occurs and quite annoying since it happens in almost every component we have. Would love for this to be handled or suppressed somehow.

@github-actions github-actions bot removed the stale label Apr 28, 2024
@wanisfahmyDE
Copy link
Author

tagging some maintainers @Irma12 @kissmikijr for visibility

@kissmikijr kissmikijr self-assigned this Apr 29, 2024
@andrewthauer
Copy link

I should clarify the 404 popup error is the annoying part imo. I personally have less concerns with the badges, etc not rendering properly.

@jagexjake
Copy link

This is affecting us aswell, and is pretty annoying. Will look at contirbuting a PR for this

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Aug 24, 2024
@wanisfahmyDE
Copy link
Author

Not stale

@github-actions github-actions bot removed the stale label Aug 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants