DevoteamNL / opendora

Team performance insights for your organization.
GNU General Public License v3.0
68 stars 8 forks source link

Access to fetch at "foo" from origin "bar" has been blocked by CORS policy #137

Open yoramshai opened 9 months ago

yoramshai commented 9 months ago

Description

When backstage trying to fetch Dora's data, it is blocked by CORS.

Expected behavior

Able to fetch the data from devlake.

Actual Behavior

image

Reproduction steps

Navigating to openDora tab in backstage.

Your Environment

Backstage and Devlake are installed in the same Kubernetes cluster.

Context of the bug

vcx

Have you spent some time to check if this bug has been raised before?

Are you willing to submit PR?

None

duke-b commented 9 months ago

Hello @yoramshai , I believe this is due to the way plugin is trying to reach the backend in your setup. I suggest checking your ingress. We will try to replicate the issue and help you out. :)

duke-b commented 8 months ago

@yoramshai we have detected and hopefully solved the CORS issue in our new release (0.3.1). If you could let us know if the issue is still present for you, we'll be here to help.

yoramshai commented 7 months ago

Thank you @duke-b once I will back to it I will update if it solved.

miguel258 commented 6 months ago

Hi @duke-b this error is still happening, im using the latest version (0.4) and the plugin cant get some data from DevLake. If works for something the failed API resources launch errors when hit the API directly from postman, this make me to think that inclusive is another bug.

Sample :

Resource : http://localhost:10666/dora/api/metric?type=cfr&aggregation=monthly Response : Error 1054 (42S22): Unknown column 'repos.name' in 'where clause'

Saurav0806 commented 6 months ago

After using the latest backstage opendora plugin, the issue still through the same error

duke-b commented 5 months ago

@miguel258 , from the response error it seems it is having issues with the devlake database in the background. I have a spare laptop so I will re-run everything fresh on the new environment to try to replicate the issue you are having and post the feedback here shortly.

parzival2332 commented 3 months ago

Hey guys I have Dora deployed in GKE also with devlake as well and I am getting the same CORS error when trying to access Dora from the backstage plugin. Is there any news on this ?

thiago-scherrer commented 2 months ago

Same here:

image

yarn run v1.22.22
node: v20.15.1
yarn: 1.22.22
cli:  0.27.0 (installed)
backstage:  1.30.4

Dependencies:
  @backstage/app-defaults                                          1.5.10
  @backstage/backend-app-api                                       0.7.9, 0.9.3
  @backstage/backend-common                                        0.21.7, 0.23.3, 0.24.1
  @backstage/backend-defaults                                      0.4.4
  @backstage/backend-dev-utils                                     0.1.5
  @backstage/backend-openapi-utils                                 0.1.17
  @backstage/backend-plugin-api                                    0.6.21, 0.7.0, 0.8.1
  @backstage/backend-tasks                                         0.5.27, 0.6.1
  @backstage/catalog-client                                        1.6.6
  @backstage/catalog-model                                         1.6.0
  @backstage/cli-common                                            0.1.14
  @backstage/cli-node                                              0.2.7
  @backstage/cli                                                   0.27.0
  @backstage/config-loader                                         1.9.0
  @backstage/config                                                1.2.0
  @backstage/core-app-api                                          1.14.2
  @backstage/core-compat-api                                       0.2.8
  @backstage/core-components                                       0.13.10, 0.14.10
  @backstage/core-plugin-api                                       1.9.3
  @backstage/dev-utils                                             1.0.37
  @backstage/e2e-test-utils                                        0.1.1
  @backstage/errors                                                1.2.4
  @backstage/eslint-plugin                                         0.1.8
  @backstage/frontend-plugin-api                                   0.6.7, 0.7.0
  @backstage/integration-aws-node                                  0.1.12
  @backstage/integration-react                                     1.1.30
  @backstage/integration                                           1.14.0
  @backstage/plugin-api-docs                                       0.11.8
  @backstage/plugin-auth-backend-module-atlassian-provider         0.2.5
  @backstage/plugin-auth-backend-module-aws-alb-provider           0.1.17
  @backstage/plugin-auth-backend-module-azure-easyauth-provider    0.1.7
  @backstage/plugin-auth-backend-module-bitbucket-provider         0.1.7
  @backstage/plugin-auth-backend-module-cloudflare-access-provider 0.2.1
  @backstage/plugin-auth-backend-module-gcp-iap-provider           0.2.19
  @backstage/plugin-auth-backend-module-github-provider            0.1.21
  @backstage/plugin-auth-backend-module-gitlab-provider            0.1.21
  @backstage/plugin-auth-backend-module-google-provider            0.1.21
  @backstage/plugin-auth-backend-module-guest-provider             0.1.10
  @backstage/plugin-auth-backend-module-microsoft-provider         0.1.19
  @backstage/plugin-auth-backend-module-oauth2-provider            0.2.5
  @backstage/plugin-auth-backend-module-oauth2-proxy-provider      0.1.17
  @backstage/plugin-auth-backend-module-oidc-provider              0.2.6
  @backstage/plugin-auth-backend-module-okta-provider              0.0.17
  @backstage/plugin-auth-backend-module-onelogin-provider          0.1.5
  @backstage/plugin-auth-backend                                   0.22.12
  @backstage/plugin-auth-node                                      0.4.17, 0.5.1
  @backstage/plugin-auth-react                                     0.1.5
  @backstage/plugin-bitbucket-cloud-common                         0.2.22
  @backstage/plugin-catalog-backend-module-gcp                     0.2.1
  @backstage/plugin-catalog-backend-module-github-org              0.2.2
  @backstage/plugin-catalog-backend-module-github                  0.7.2
  @backstage/plugin-catalog-backend-module-scaffolder-entity-model 0.1.22
  @backstage/plugin-catalog-backend                                1.25.2
  @backstage/plugin-catalog-common                                 1.0.26
  @backstage/plugin-catalog-graph                                  0.4.8
  @backstage/plugin-catalog-import                                 0.12.2
  @backstage/plugin-catalog-node                                   1.12.6
  @backstage/plugin-catalog-react                                  1.12.3
  @backstage/plugin-catalog                                        1.22.0
  @backstage/plugin-events-node                                    0.3.10
  @backstage/plugin-home-react                                     0.1.16
  @backstage/plugin-home                                           0.7.9
  @backstage/plugin-kubernetes-backend                             0.18.5
  @backstage/plugin-kubernetes-common                              0.8.2
  @backstage/plugin-kubernetes-node                                0.1.18
  @backstage/plugin-kubernetes-react                               0.4.2
  @backstage/plugin-kubernetes                                     0.11.13
  @backstage/plugin-org                                            0.6.28
  @backstage/plugin-permission-backend-module-allow-all-policy     0.1.21
  @backstage/plugin-permission-backend                             0.5.48
  @backstage/plugin-permission-common                              0.7.14, 0.8.1
  @backstage/plugin-permission-node                                0.7.32, 0.8.2
  @backstage/plugin-permission-react                               0.4.25
  @backstage/plugin-proxy-backend                                  0.5.5
  @backstage/plugin-scaffolder-backend-module-azure                0.1.16
  @backstage/plugin-scaffolder-backend-module-bitbucket-cloud      0.1.14
  @backstage/plugin-scaffolder-backend-module-bitbucket-server     0.1.14
  @backstage/plugin-scaffolder-backend-module-bitbucket            0.2.14
  @backstage/plugin-scaffolder-backend-module-gerrit               0.1.16
  @backstage/plugin-scaffolder-backend-module-gitea                0.1.14
  @backstage/plugin-scaffolder-backend-module-github               0.4.2
  @backstage/plugin-scaffolder-backend-module-gitlab               0.4.6
  @backstage/plugin-scaffolder-backend                             1.24.1
  @backstage/plugin-scaffolder-common                              1.5.5
  @backstage/plugin-scaffolder-node                                0.4.10
  @backstage/plugin-scaffolder-react                               1.11.0
  @backstage/plugin-scaffolder                                     1.24.0
  @backstage/plugin-search-backend-module-catalog                  0.2.1
  @backstage/plugin-search-backend-module-explore                  0.1.28, 0.2.1
  @backstage/plugin-search-backend-module-techdocs                 0.2.1
  @backstage/plugin-search-backend-node                            1.3.1
  @backstage/plugin-search-backend                                 1.5.16
  @backstage/plugin-search-common                                  1.2.14
  @backstage/plugin-search-react                                   1.7.14
  @backstage/plugin-search                                         1.4.15
  @backstage/plugin-signals-react                                  0.0.4
  @backstage/plugin-techdocs-backend                               1.10.12
  @backstage/plugin-techdocs-common                                0.1.0
  @backstage/plugin-techdocs-module-addons-contrib                 1.1.13
  @backstage/plugin-techdocs-node                                  1.12.10
  @backstage/plugin-techdocs-react                                 1.2.7
  @backstage/plugin-techdocs                                       1.10.8
  @backstage/plugin-user-settings-common                           0.0.1
  @backstage/plugin-user-settings                                  0.8.11
  @backstage/release-manifests                                     0.0.11
  @backstage/test-utils                                            1.5.10
  @backstage/theme                                                 0.4.4, 0.5.6
  @backstage/types                                                 1.1.1
  @backstage/version-bridge                                        1.0.8
yoramshai commented 1 week ago

is someone managed to get this work ?