Skip to content

Resolve the ClickHouse config symlink in PMM-T2237 - #1180

Open
claude[bot] wants to merge 1 commit into
mainfrom
claude/kind-meitner-r5p0cj
Open

Resolve the ClickHouse config symlink in PMM-T2237#1180
claude[bot] wants to merge 1 commit into
mainfrom
claude/kind-meitner-r5p0cj

Conversation

@claude

@claude claude Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Failures fixed (investigator)

  • source: Percona-Lab/pmm-submodules#4516 — run 31586770693, check E2E / Docker configuration tests / e2e tests: @docker-configuration (job 94467124725)
  • tests:
    • e2e_tests/tests/dockerConfiguration/clickhouseConfig.test.ts:32 / @docker-configuration — PMM-T2237, config pmm-server-default-clickhouse-config
    • e2e_tests/tests/dockerConfiguration/clickhouseConfig.test.ts:32 / @docker-configuration — PMM-T2237, config pmm-server-low-memory-clickhouse-config
    • e2e_tests/tests/dockerConfiguration/clickhouseConfig.test.ts:32 / @docker-configuration — PMM-T2237, config pmm-server-no-flag-clickhouse-config

What failed

All three PMM-T2237 cases, deterministically, on all three retries each. The Playwright step itself
ends in || true, so the job went red one step later on launchable gate
(Actionable Failures | 3):

Error: Config name should be: default-config but actual value is: Processing configuration file '/etc/clickhouse-server/config.xml'.

expect(received).toContain(expected)
Expected substring: "default-config.xml"
Received string:    "Processing configuration file '/etc/clickhouse-server/config.xml'."

Root cause — the assertion, not the product

The test read the ClickHouse startup log and expected the line to name the config
PMM_CLICKHOUSE_CONFIG selected.

percona/pmm#5747 (PMM-15309, the PR this FB builds)
changes how that config is handed to ClickHouse. Server is now always started with the fixed
config.xml name:

-command = /usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/{{ .ClickHouseConfig }}-config.xml
+command = /usr/bin/clickhouse-server --config-file=/etc/clickhouse-server/config.xml

and pmm-managed-init repoints config.xml / users.xml at the selected config
(clickhouse.LinkClickHouseConfig), so drop-ins in config.d / users.d keep working for every
config. The env var still does exactly what PMM-T2237 is there to check — but the startup log now
names config.xml for every config, so a comparison on that file name can no longer see it.

The fix

Take the path ClickHouse reports and resolve it before comparing. That holds for both shapes:

Build logged path readlink -f
main today, PMM_CLICKHOUSE_CONFIG=low-memory /etc/clickhouse-server/low-memory-config.xml /etc/clickhouse-server/low-memory-config.xml
FB PR-4516 (with #5747), same variable /etc/clickhouse-server/config.xml /etc/clickhouse-server/low-memory-config.xml

Note the middle column: on main the config.xml symlink exists but always points at
default-config.xml and is unused, so resolving that fixed name instead of the logged one would
be wrong there. Resolving the logged path is what covers both.

Not blocked on #5747 — it passes before and after that PR lands (verified below).

Verification

Reproduced and fixed against the exact FB image perconalab/pmm-server-fb:PR-4516-99b98f1,
digest sha256:7577435e… — the same digest Launchable recorded for the failing CI run — and
against perconalab/pmm-server:3-dev-latest for the pre-#5747 shape. Real Docker, Chromium
151.0.7922.34 (the build CI uses), same npx playwright test --grep "@docker-configuration"
invocation:

Test version FB PR-4516 image (has #5747) 3-dev-latest (no #5747)
main 3 failedExpected substring: "default-config.xml", identical to CI passes (this is why CI only went red on this FB)
this branch 3 passed 3 passed

The check still discriminates, rather than passing on anything. On the FB image with
PMM_CLICKHOUSE_CONFIG=low-memory, repointing the symlink back at the default config — the shape
a "PMM ignores the variable" regression would produce — resolves to default-config.xml, which
fails the assertion:

as shipped:                         /etc/clickhouse-server/low-memory-config.xml
env var ignored (link at default):  /etc/clickhouse-server/default-config.xml

npx tsc --noEmit, ESLint and Prettier are clean.

Not covered here, and only the next real FB/nightly run confirms: the rest of the
@docker-configuration suite under Launchable subsetting.

Other failure in that run (not fixed here)

E2E / Docker configuration tests / e2e tests: @docker-configuration appears twice in that run —
the check-run listing collapses both jobs under one name. The other one
(94467124622,
CodeceptJS) failed on PMM-T2020 - Verify external clickhouse as datasource on explore page, the
external-ClickHouse side of the same PMM-15309 change. That is already covered by open PR #1164,
so it is deliberately left alone here.


Generated by Claude Code

PMM-15309 (percona/pmm#5747) starts ClickHouse with the fixed
/etc/clickhouse-server/config.xml name and repoints that symlink at the
config PMM_CLICKHOUSE_CONFIG selects, so the startup log no longer names
the selected config and the assertion on its file name broke.

Read the path ClickHouse reports and resolve it before comparing, which
holds both for builds that pass the selected config directly and for
those that go through the symlink.

Signed-off-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W7o8QCjF8zvg4QQHFvRE4D
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.

2 participants