Skip to content

Conversation

dmitri-saricev-3pillargloball
Copy link

@dmitri-saricev-3pillargloball dmitri-saricev-3pillargloball commented Sep 19, 2025

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:
Screenshot 2025-09-19 at 13 27 24
Resolved Issue:
Screenshot 2025-09-19 at 13 26 38

Fixes #

Special notes for your reviewer:

FB:
Percona-Lab/pmm-submodules#4045

const licenseUrl = licenseInfo.licenseUrl ?? '';
const isDefaultGrafanaUpgradeLink =
licenseUrl === '/graph/admin/upgrading' ||
/grafana\.com\/grafana\/.*upgrade|admin\/upgrading/i.test(licenseUrl);
Copy link
Collaborator

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 ?? '');
Copy link
Collaborator

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!',
Copy link
Collaborator

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
Copy link
Collaborator

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants