-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Plugins: Don't auto prepend app sub url to plugin asset paths #81658
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR must be merged before a backport PR will be created. |
2 similar comments
This PR must be merged before a backport PR will be created. |
This PR must be merged before a backport PR will be created. |
…/grafana/grafana into plugin-paths-proxy-rendering-fix
…/grafana/grafana into plugin-paths-proxy-rendering-fix
…ath, update usage
marefr
approved these changes
Feb 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM looks reasonable 👍 Would like some additional eyes on the frontend changes :)
academo
reviewed
Feb 7, 2024
…/grafana/grafana into plugin-paths-proxy-rendering-fix
academo
approved these changes
Feb 8, 2024
grafana-delivery-bot bot
pushed a commit
that referenced
this pull request
Feb 8, 2024
* don't prepend app sub url to paths * simplify logo path * fix(plugins): dynamically prepend appSubUrl for System module resolving to work * fix(sandbox): support dynamic appSuburl prepend when loading plugin module.js * fix tests * update test name * fix tests * update fe + add some tests * refactor(plugins): move wrangleurl to utils, rename to resolveModulePath, update usage * chore: fix a typo * test(plugins): add missing name to utils test * reset test flag --------- Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com> (cherry picked from commit 99feb92)
3 tasks
grafana-delivery-bot bot
pushed a commit
that referenced
this pull request
Feb 8, 2024
* don't prepend app sub url to paths * simplify logo path * fix(plugins): dynamically prepend appSubUrl for System module resolving to work * fix(sandbox): support dynamic appSuburl prepend when loading plugin module.js * fix tests * update test name * fix tests * update fe + add some tests * refactor(plugins): move wrangleurl to utils, rename to resolveModulePath, update usage * chore: fix a typo * test(plugins): add missing name to utils test * reset test flag --------- Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com> (cherry picked from commit 99feb92)
3 tasks
wbrowne
added a commit
that referenced
this pull request
Feb 8, 2024
…hs (#82146) Plugins: Don't auto prepend app sub url to plugin asset paths (#81658) * don't prepend app sub url to paths * simplify logo path * fix(plugins): dynamically prepend appSubUrl for System module resolving to work * fix(sandbox): support dynamic appSuburl prepend when loading plugin module.js * fix tests * update test name * fix tests * update fe + add some tests * refactor(plugins): move wrangleurl to utils, rename to resolveModulePath, update usage * chore: fix a typo * test(plugins): add missing name to utils test * reset test flag --------- Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com> (cherry picked from commit 99feb92) Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
wbrowne
added a commit
that referenced
this pull request
Feb 8, 2024
…hs (#82147) Plugins: Don't auto prepend app sub url to plugin asset paths (#81658) * don't prepend app sub url to paths * simplify logo path * fix(plugins): dynamically prepend appSubUrl for System module resolving to work * fix(sandbox): support dynamic appSuburl prepend when loading plugin module.js * fix tests * update test name * fix tests * update fe + add some tests * refactor(plugins): move wrangleurl to utils, rename to resolveModulePath, update usage * chore: fix a typo * test(plugins): add missing name to utils test * reset test flag --------- Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com> (cherry picked from commit 99feb92) Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Ukochka
pushed a commit
that referenced
this pull request
Feb 14, 2024
* don't prepend app sub url to paths * simplify logo path * fix(plugins): dynamically prepend appSubUrl for System module resolving to work * fix(sandbox): support dynamic appSuburl prepend when loading plugin module.js * fix tests * update test name * fix tests * update fe + add some tests * refactor(plugins): move wrangleurl to utils, rename to resolveModulePath, update usage * chore: fix a typo * test(plugins): add missing name to utils test * reset test flag --------- Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
3 tasks
This was referenced Mar 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
add to changelog
area/backend
area/frontend
area/plugins
backport v10.2.x
backport v10.3.x
Mark PR for automatic backport to v10.3.x
type/bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this feature?
This moves the prefixing of
appSubUrl
for plugin assets to the frontend so it can be dynamically appended depending on the request.This is required because under certain conditions the image renderer changes the
config.appSubUrl
before making the request to Grafana backend. This leads to frontend asset paths for Grafana and external plugins being mismatched as the base and module are set in the backend when the server boots. As such we need this to be prefixed dynamically which means the frontend is pretty much our only choiceWhy do we need this feature?
Fixes a failed plugin loading bug with the Image Renderer plugin for instances of Grafana where requests are served from a sub path via proxy.
Who is this feature for?
Grafana Users
Which issue(s) does this PR fix?:
Fixes #76180
Special notes for your reviewer:
Please check that: