-
Notifications
You must be signed in to change notification settings - Fork 8
PMM-14014 Incorrect open source link in help section #846
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
Conversation
const licenseUrl = licenseInfo.licenseUrl ?? ''; | ||
const isDefaultGrafanaUpgradeLink = | ||
licenseUrl === '/graph/admin/upgrading' || | ||
/grafana\.com\/grafana\/.*upgrade|admin\/upgrading/i.test(licenseUrl); |
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.
Why is there a need to this additional check with regex?
|
||
if (buildInfo.hasUpdate) { | ||
// Consider it OSS if edition explicitly contains "open source" | ||
const isOssEdition = /open\s*source/i.test(buildInfo.edition ?? ''); |
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 think we don't need to check for the OSS version as PMM will always be using that one.
id: 'updateVersion', | ||
text: `New version available!`, | ||
icon: 'download-alt', | ||
text: 'New version available!', |
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.
If possible could we keep changes to this file at minimum (newlines, comments, refactoring, prop reordering, etc.)?
The reasoning is when we pull in changes from upstream we want to avoid dealing with additional conflicts.
const isOssEdition = /open\s*source/i.test(buildInfo.edition ?? ''); | ||
|
||
if (isDefaultGrafanaUpgradeLink || isOssEdition) { | ||
// Replace with Percona OSS link |
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.
Could you add a // @PERCONA
comment here, since it is a change in upstream code?
Generally everything outside of public/app/percona
is upstream code (with some exceptions that should be marked with @PERCONA
)
What this PR does / why we need it:
Incorrect open source link in Help section
Which issue(s) this PR fixes:
https://perconadev.atlassian.net/browse/PMM-14014
Was issue:


Resolved Issue:
Fixes #
Special notes for your reviewer:
FB:
Percona-Lab/pmm-submodules#4045