-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Rendering: Fix Windows plugin signature check #76123
Conversation
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.
I pray for the day we can delete this check 😭
LGTM!
@@ -209,7 +209,7 @@ func (s *Signature) Calculate(ctx context.Context, src plugins.PluginSource, plu | |||
f = toSlash(f) | |||
|
|||
// Ignoring unsigned Chromium debug.log so it doesn't invalidate the signature for Renderer plugin running on Windows | |||
if runningWindows && plugin.JSONData.Type == plugins.TypeRenderer && f == "chrome-win/debug.log" { | |||
if runningWindows && plugin.JSONData.Type == plugins.TypeRenderer && strings.HasSuffix(f, "debug.log") { |
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.
Nit: Maybe filepath.Base
is the most appropriate func to use here now 🤔
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.
Good idea, I updated the PR.
Yes, I agree! Do we have an issue about how we could fix this? |
What is this feature?
With the recent puppeteer upgrade in the grafana-image-renderer plugin, the path to the
debug.log
file was updated fromchrome/debug.log
tochrome/win64-<chrome version>/chrome-win64/debug.log
. This PR updates the signature check accordingly (but still support old versions of the image renderer).Why do we need this feature?
Without this, new versions of the image renderer plugin won't be able to load once the
debug.log
is created by the Chrome process.Who is this feature for?
Windows users using the grafana-image-renderer plugin.
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: