Skip to content

Fix: plugin loader cache not matching on decoupled plugin paths #108529

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

Merged
merged 4 commits into from
Jul 24, 2025

Conversation

jackw
Copy link
Contributor

@jackw jackw commented Jul 23, 2025

What is this feature?

This PR fixes an issue due to Decoupled core plugins now loading from different asset paths to regular plugins which prevented the loader cache (which stores information related to which version to append to the cache buster query param and loadingStrategy) from having any effect.

Screenshot 2025-07-23 at 16 24 11

Why do we need this feature?

So decoupled plugins continue to load using the version as a cache buster and the correct loading strategy

Screenshot 2025-07-23 at 16 22 13

Who is this feature for?

Everyone.

Which issue(s) does this PR fix?:

Fixes #107132

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@jackw jackw self-assigned this Jul 23, 2025
@jackw jackw requested a review from a team as a code owner July 23, 2025 14:28
@jackw jackw requested review from oshirohugo and removed request for a team July 23, 2025 14:28
@jackw jackw added no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes labels Jul 23, 2025
@github-actions github-actions bot added this to the 12.1.x milestone Jul 23, 2025
@jackw jackw requested a review from wbrowne July 23, 2025 14:28
@jackw jackw requested a review from a team as a code owner July 23, 2025 14:32
@jackw jackw requested review from academo and removed request for a team July 23, 2025 14:32
@jackw jackw changed the title Fix: make plugin loader cache decoupled plugin aware Fix: plugin loader cache not matching on decoupled plugin paths Jul 23, 2025
Copy link
Contributor

@wbrowne wbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -19,6 +19,6 @@ server {
add_header 'Access-Control-Allow-Headers' '*' always;
add_header 'Access-Control-Allow-Credentials' 'true' always;

rewrite ^/grafana-oss/11.4.0-pre/public(.*)$ $1 last;
rewrite ^/grafana/12.1.0-pre/public(.*)$ $1 last;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it makes sense to keep this as the non OSS version from now on 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I missing something or this functionality doesn't fully work in OSS version now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually maybe it doesn't make sense to change. Core plugins in OSS won't make use of this feature - but this change means OSS assets won't get loaded, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't get anything to load whilst testing this without making this change but maybe I made a mistake somewhere down the road to getting this all running locally for this bug fix. I'll revert the -oss part. The version change is legit.

@github-project-automation github-project-automation bot moved this from 📬 Triage to 🔬 In review in Plugins Platform / Grafana Community Jul 23, 2025
@jackw jackw merged commit d852bde into main Jul 24, 2025
120 of 122 checks passed
@jackw jackw deleted the jackw/fix-loading-decoupled-plugins branch July 24, 2025 09:53
@github-project-automation github-project-automation bot moved this from 🔬 In review to 🚀 Shipped in Plugins Platform / Grafana Community Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend area/plugins no-backport Skip backport of PR no-changelog Skip including change in changelog/release notes
Projects
Status: 🚀 Shipped
Development

Successfully merging this pull request may close these issues.

Serve decoupled plugins from CDN
4 participants