Anchor PS replication service regexes; skip SSH-key settings off AMI - #1178
Open
claude[bot] wants to merge 1 commit into
Open
Anchor PS replication service regexes; skip SSH-key settings off AMI#1178claude[bot] wants to merge 1 commit into
claude[bot] wants to merge 1 commit into
Conversation
The ps_pmm_replication_* service names end in a random suffix, so the unanchored '_1'/'_2' node patterns also matched the other node whenever that suffix started with 1 or 2 -- PMM-T2029 then opened the Replication Summary dashboard for the source, whose replica-status panels are empty. PMM-15302 renders the SSH Key settings tab only on AMI, so skip the SSH-key tooltip and section checks on other distributions. Signed-off-by: Claude <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Failures fixed (investigator)
e2e_tests/tests/dashboards/mysql/mysqlDashboards.test.ts:144/@pmm-ps-integration— PMM-T2029 Verify dashboard for MySQL Replication Summarycodeceptjs-e2e/tests/configuration/verifyPMMSettingsPageFunctionality_test.js:243/@fb-settings— PMM-T1227 + PMM-T1338 Verify tooltip "Read more" links on PMM Settings pageTwo unrelated failures, both in pmm-qa's own test code. Neither is a PMM regression.
1.
@pmm-ps-integrationPMM-T2029 — an unanchored regex selecting the source nodeEvery empty panel is a replica-status panel, and they are empty because the test opened the
dashboard for the source instead of the replica.
percona-server-setup.ymlappends a random suffix to each service name(
random_service_name_value: "_{{ 99999 | random + 1 }}"), so the two services areps_pmm_replication_8_0_1_<random>andps_pmm_replication_8_0_2_<random>. The test selectedthe replica with the unanchored pattern
ps_pmm_replication_.*_2, which also matches thesource whenever that random suffix starts with
2— andgetServiceDetailsByRegexAndParametersreturns
filteredServices[0], the source, since it is registered first.This run drew
290:Only the replica carries the metrics behind those five panels — confirmed on the reproduction
server, where
mysql_slave_status_slave_io_runningexists for exactly one service:That is also why this is intermittent rather than always red: a suffix in
1..99999starts with2about 11% of the time, and PMM-T2029 passed in the two immediately preceding FB runs(31633396444,
31651545058).
Fix: anchor the patterns. Two further call sites carry the identical latent defect and are
fixed the same way — they did not fail in this run:
mysqlDashboards.test.ts:84PMM-T324 usesps_pmm_replication_.*_1, which mirrors the bug(it matches the replica whenever the suffix starts with
1).mysqlQanStoredMetrics.test.ts:25PMM-T2030 "Verify QAN for PS Replica Instance" uses thesame
_2pattern, so it can silently assert against the source.The anchored form follows the idiom already used in
tests/standalone/screenshots.global-setup.ts(
^rs101(_\d+)?$), and selects exactly one correct service for every name shape in use:_1regex_2regexps_pmm_replication_8_0_1_290ps_pmm_replication_8_0_2_290ps_pmm_replication_8_0_1_55934ps_pmm_replication_8_0_2_199ps_pmm_replication_8_4_1(no suffix)ps_pmm_gr_8_0_2_85826This is deliberately not handled by adding the five panels to the dashboard's
noDataMetrics: the data is there, on the replica. Suppressing them would switch off a real"MySQL Replication Summary shows nothing" signal for good.
2.
@fb-settingsPMM-T1227 — the SSH Key tab no longer exists off AMIThis is the FB's own change working as intended. The build under test is
PMM-15302-ha-remove-ssh-settings, and percona/pmm#5744("PMM-15302 Show ssh key tab only in AMI deployment") renders the tab only for AMI and redirects
the route everywhere else:
The FB server reports
"distribution_method": "DISTRIBUTION_METHOD_DOCKER", so/pmm-ui/settings/ssh-keyredirects to/settingsand the tooltip never appears.getSubpageTooltips()walked that subpage unconditionally.Fix: add
serverApi.getDistributionMethod()and include the SSH-key subpage only on AMI,using the version-gated idiom already in
leftNavigation_test.js.PMM-T85 - Verify SSH Key Section Elements(@settings @grafana-pr, not run in this FB) is gated the same way — it isthe identical defect and would go red in nightly the moment #5744 lands.
This is not blocked on #5744: with the tab present (
maintoday) the check is skipped, withit absent (the FB, and
mainafter #5744) it is skipped, and on AMI it still runs.Verification
One throwaway Linode VM running the exact FB server image
perconalab/pmm-server-fb:PR-4515-b0470c2, digestsha256:9ecd3d39…— the same digest Launchablerecorded for the CI run — with the FB client tarball, the PS job's own
WIZARD_ARGS(
--database ps,SETUP_TYPE=replication,MY_ROCKS=true --database ps,SETUP_TYPE=gr,QUERY_SOURCE=slowlog),and Chromium 151.0.7922.34, the build CI reported.
PMM-T2029. The VM's own setup drew suffix
55934, under which the bug cannot fire and all four@pmm-ps-integrationtests passed — matching the two preceding green FB runs. To reproduce thefailing condition rather than wait for it, both services were re-registered with CI's exact drawn
names (
_290), leaving the databases untouched:mysqlDashboards.test.ts --grep @pmm-ps-integration, names…_290mainMetrics without data are: IO thread running,SQL thread running,Replication delay,MySQL replication lag,Relay log space, identical to CI including the follow-onMySQL replication laglegend timeoutPMM-T1227, same VM, same image:
codeceptjs run --grep PMM-T1227mainelement (SSH key tooltip) still not visible after 10 sec, identical to CI/settings/ssh-key)PMM-T85also passes on this branch against the same Docker deployment.npx tsc --noEmitand ESLint are clean for the changed files.Not covered by the above, and only the next real run can confirm: PMM-T324/PMM-T2030 under a
suffix that would have triggered their mirrored defect, and any AMI deployment, where the SSH-key
checks now take the branch that still asserts the tab.
Other failures in that run
None — these two checks were the only failures; the other 46 latest check-runs on
b0470c22b5db77adb9b0dc5d702292acfd37468fare green.Generated by Claude Code