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

Monaco bundle file is not cached #537

Closed
mrbar42 opened this issue Jan 11, 2023 · 3 comments
Closed

Monaco bundle file is not cached #537

mrbar42 opened this issue Jan 11, 2023 · 3 comments
Labels

Comments

@mrbar42
Copy link

mrbar42 commented Jan 11, 2023

What happened:

Whenever a query is edited in raw mode (e.g. not with the visual builder) the Monaco editor is loaded.
The monaco.min.js file wights 6MB and for some reason caching is hard-disabled in the headers + the request url contains cache bust.

That means that every time the raw editor is presented the browser loads 6MB before the editor is shown.
example URL:

https://*******.grafana.azure.com/public/plugins/grafana-azure-data-explorer-datasource/libs/monaco.min.js?_cache=1672575568412

Caching related response headers:

Cache-Control: no-cache
Expires: -1

What you expected to happen:

monaco.min.js maximizes caching capabilities of the server/CDN/browser.

How to reproduce it:

  1. edit a panel that uses an ADX data source
  2. switch to raw mode

Screenshots

I just so happened to work on a slow internet connection for a little while and this resource takes minutes to download, making the UI completely unusable for editing since it needs to load 6MB on every page load!

Obviously extremely slow connections should not be a strong reference point, but caching (large) resources feels elementary.

Environment:

  • Grafana version: v9.2.7.1 (0f96ed148c)
  • Plugin version: 4.1.6
  • OS Grafana is installed on: Azure Managed Grafana
  • User OS & Browser: Any
  • Others:
@mrbar42 mrbar42 added datasource/ADX type/bug Something isn't working labels Jan 11, 2023
@andresmgot
Copy link
Contributor

that editor is deprecated and should not be loaded with newer versions of Grafana and ADX. I believe you are hitting this issue: #505 which prevent the plugin from loading the right version but that should be fixed in the latest version of the plugin (4.1.10). Can you check if upgrading solves your issue?

@bossinc
Copy link
Contributor

bossinc commented Jan 23, 2023

@mrbar42 Have you managed to upgrade? Does this fix your issue?

@bossinc bossinc closed this as completed Jan 27, 2023
@mrbar42
Copy link
Author

mrbar42 commented Feb 5, 2023

Seem to be fixed, thank you very much!

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

No branches or pull requests

4 participants