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

Not refreshing data #135

Closed
mchiuminatto opened this issue Dec 13, 2022 · 2 comments
Closed

Not refreshing data #135

mchiuminatto opened this issue Dec 13, 2022 · 2 comments

Comments

@mchiuminatto
Copy link

I'm setting the json data path to:

scorecards:
jsonDataUrl: /score2/

Everything is rendered nicely, score table and entities.

Then I manually change the score of on of the json files.

Expected Behavior

The changes is reflected in the score table and in the particular entity.

The change in the entity should be reflected in the score table and score entity.

Current Behavior

Steps to Reproduce

Possible Solution

Context

I'm not being able to deploy a feature for a customer.

Your Environment

Output of yarn backstage-cli info:

yarn run v1.22.1
$ /Users/marcello.chiuminatto/fc_dev/platform-backstage/node_modules/.bin/backstage-cli info
OS:   Darwin 21.6.0 - darwin/arm64
node: v16.18.1
yarn: 1.22.1
cli:  0.19.0 (installed)
backstage:  1.6.0

Dependencies:
  @backstage/app-defaults                          1.0.6
  @backstage/backend-common                        0.15.1
  @backstage/backend-plugin-api                    0.1.2
  @backstage/backend-tasks                         0.3.5
  @backstage/catalog-client                        1.1.0
  @backstage/catalog-model                         1.1.1
  @backstage/cli-common                            0.1.10
  @backstage/cli                                   0.19.0
  @backstage/config-loader                         1.1.4
  @backstage/config                                1.0.2
  @backstage/core-app-api                          1.1.0
  @backstage/core-components                       0.11.1
  @backstage/core-plugin-api                       1.0.6
  @backstage/errors                                1.1.1
  @backstage/integration-react                     1.1.4
  @backstage/integration                           1.3.1
  @backstage/plugin-api-docs                       0.8.9
  @backstage/plugin-app-backend                    0.3.36
  @backstage/plugin-auth-backend                   0.16.0
  @backstage/plugin-auth-node                      0.2.5
  @backstage/plugin-catalog-backend-module-aws     0.1.9
  @backstage/plugin-catalog-backend                1.4.0
  @backstage/plugin-catalog-common                 1.0.6
  @backstage/plugin-catalog-graph                  0.2.21
  @backstage/plugin-catalog-import                 0.8.12
  @backstage/plugin-catalog-node                   1.1.0
  @backstage/plugin-catalog-react                  1.1.4
  @backstage/plugin-catalog                        1.5.1
  @backstage/plugin-github-actions                 0.5.9
  @backstage/plugin-org                            0.5.9
  @backstage/plugin-pagerduty                      0.5.2
  @backstage/plugin-permission-common              0.6.4
  @backstage/plugin-permission-node                0.6.5
  @backstage/plugin-permission-react               0.4.5
  @backstage/plugin-proxy-backend                  0.2.30
  @backstage/plugin-scaffolder-backend             1.6.0
  @backstage/plugin-scaffolder-common              1.2.0
  @backstage/plugin-scaffolder                     1.6.0
  @backstage/plugin-search-backend-module-pg       0.4.0
  @backstage/plugin-search-backend-node            1.0.2
  @backstage/plugin-search-backend                 1.0.2
  @backstage/plugin-search-common                  1.0.1
  @backstage/plugin-search-react                   1.1.0
  @backstage/plugin-search                         1.0.2
  @backstage/plugin-tech-radar                     0.5.16
  @backstage/plugin-techdocs-backend               1.3.0
  @backstage/plugin-techdocs-module-addons-contrib 1.0.4
  @backstage/plugin-techdocs-node                  1.4.0
  @backstage/plugin-techdocs-react                 1.0.4
  @backstage/plugin-techdocs                       1.3.2
  @backstage/plugin-user-settings                  0.4.8
  @backstage/release-manifests                     0.0.6
  @backstage/test-utils                            1.2.0
  @backstage/theme                                 0.2.16
  @backstage/types                                 1.0.0
  @backstage/version-bridge                        1.0.1
✨  Done in 1.77s.

@jvilimek
Copy link
Collaborator

jvilimek commented Dec 13, 2022

Thanks for reporting this.
I believe this is related to the fact, of how the browser is handling data. The JSON file is loaded via "fetch" method using standard browser resources loading. When the json file is returned from the web server it also contains a cache header to indicate when a browser may request a new version.
Looking on local environment the cache is set to 1 hour:
image

It depends on how your backstage instance is configured to handle the cache for static files.

If more real-time data needs to be implemented simply reduce the cache. Unfortunately, I am not familiar with how to configure this.

@mchiuminatto
Copy link
Author

Thanks for the reply. Finally it was not an issue with the plugin but with our deployment. I was mounting a folder in the backend pod, but the plugin takes the data from a folder in the front-end pod so I was modifying files in the backend hoping to see those changes in the UI. The front end older from where serves the json files is usr/shared/nginx/html/<folder specified in jsonDataUrl >

By the way the scorecard is awesome.

Regards!

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

2 participants