Skip to content

Move the async distributed INSERT directory name test to the integration suite - #117284

Merged
PedroTadim merged 4 commits into
ClickHouse:masterfrom
groeneai:fix-04725-ip-literal-hosts
Sep 2, 2026
Merged

PedroTadim merged 4 commits into
ClickHouse:masterfrom
groeneai:fix-04725-ip-literal-hosts

Conversation

@groeneai

@groeneai groeneai commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

Related: #112719
Related: #113083

Upgrade check (amd_release)'s Error message in clickhouse-server.log leaf fails on four lines like

<Error> Cluster: Code: 198. DB::NetException: Not found address of host: aaa...aaa. (DNS_ERROR)

They come from 04725_distributed_async_insert_long_directory_name, which needs an async INSERT directory name over NAME_MAX and took that length from a 250 byte host. --fake-drop makes every DROP a no-op, so its Remote tables reach the post-upgrade server, where attaching one resolves each address and logs the failure at Error.

Two changes:

  1. The test is removed and its coverage moves to tests/integration/test_distributed_format. The limit applies to the whole name, user[:password]@host:port#default_database, and Cluster::Address::default_database is only ever assigned from <remote_servers> (Cluster.cpp:122), so a stateless test could lengthen only the user, the password or the host. A configured cluster can use the long database name of the reproducer in 112719 instead. The new case keeps what only the stateless test had: 255 bytes accepted and 256 rejected, the message not disclosing the password, and the compact format unaffected. Its fourth assertion, that a rejected destination leaves no directory behind for an earlier one in the same shard, moves into the mixed-cluster test next to it.

  2. An exclusion in the scan, because 1 alone cannot clear the red: upgrade_runner.sh runs the tests from a clone of the previous release tag, so the copy it executes is the one frozen in v26.8.1.2041-lts, which nothing here can touch. The entry requires the Cluster logger, Code: 198, and a first host label of 64 or more identical characters, which exceeds the 63 octets RFC 1035 permits; against eight real occurrences it excluded 32 of 32 fixture lines and left 96 unrelated ones visible. It can go once a release without the test is the previous one.

Failing check: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=111708&sha=81c79d32dc61180db04e7c3b380e233f4cc36d7b&name_0=PR&name_1=Upgrade%20check%20%28amd_release%29


Workflow [PR]
Sync PR [sync-upstream/pr/117284]

Version info

  • Merged into: 26.9.1.556 (included in 26.9 and later)
  • Backported to: 26.8.3.19

04725_distributed_async_insert_long_directory_name needs an async distributed
INSERT directory name longer than NAME_MAX. It produced that length by making
the destination host 242-250 bytes long, which cannot resolve.

In the upgrade check every DROP is a no-op (tests/clickhouse-test adds
--fake-drop whenever --upgrade-check is set), so the four Remote tables survive
into the post-upgrade server. Attaching ENGINE = Remote builds a Cluster
unconditionally, which resolves each address; the failure is swallowed but
logged through tryLogCurrentException("Cluster") at Error priority. The
post-upgrade log scan then reports four unallowlisted lines:

  <Error> Cluster: Code: 198. DB::NetException: Not found address of host: ...

Keep the destination addresses as IPv4 literals, which return from
resolveIPAddressImpl before hostByName is ever called, and carry the required
length in the user name instead: it is equally part of the directory name built
by Cluster::Address::toFullString and equally settable from Remote() DDL. One
shared 233-byte user with 127.0.0.10 / 127.0.0.100 / 127.0.0.1 reproduces the
same four name lengths (255 accepted, 256 rejected, 254 plus 256, 268), so every
assertion and the whole .reference stay byte-identical.

at_limit and over_limit share that user and differ by exactly one escaped host
byte, so the pair is a two-sided pin: a one-byte drift in the user literal makes
one of them fail. Both boundaries were re-checked by mutating the NAME_MAX
predicate one byte in each direction; the test reddens for both.
@groeneai groeneai added can be tested Allows running workflows for external contributors groeneai-origin-ci-own-pr PR origin: CI on a groeneai PR exposed a separate defect labels Aug 31, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Internal second-model review: adjudication log (click to expand)

Pre-publication review by an independent model (engine: codex; 3 findings) plus a cold review
of the resulting tree done before reading the author's evidence (3 further findings).
No blockers or majors; nothing bounced.

# Sev Finding Verdict Evidence / action
1 💡 The description claimed all four generated directory-name lengths are unchanged. AGREE, fixed in the description Re-derived Cluster::Address::toFullString (Cluster.cpp:251-253) plus escapeForFileName on both revisions: base 255 / 256 / [28, 263] / 276 against 255 / 256 / [254, 256] / 268. Two of the four do change. The description now states what is actually invariant: the NAME_MAX boundary (255 accepted, 256 rejected) and the byte-identical .reference.
2 💡 The description said all 4 CI occurrences are on unrelated pull requests. AGREE, fixed in the description Two of the four heads are mine (gh pr view --json author), so only 2 are other contributors'. Corrected rather than dropped, because the count is the reason the fix is worth making.
3 💡 The visible Related: line used a short ref, not a full GitHub URL (AGENTS.md:173,176). AGREE, fixed in the description The rule is on the branch base and :178 notes these conventions exist for humans and tooling, which a line inside an HTML comment reaches neither of. The visible line is now the full URL.
4 💡 The commit message omits the CI report URL and the corresponding PR URL (AGENTS.md:169). DISAGREE That rule is conditional on a maintainer-provided URL; this failure was found by my own CI monitor and the report URL was built from CIDB's report_url. The rule that governs this PR's surface, AGENTS.md:171, is satisfied: the description carries the full canonical json.html URL with sha, name_0 and name_1, plus Related: to the pull request that introduced the fixture. Recording it here rather than amending, since the information is already in the description.
5 💡 A dead port rather than a dead host would keep today's Code: 279 profile instead of introducing Code: 516, and is the repo's own idiom (clusters.xml uses localhost:1, 127.0.0.1:1234). DISAGREE Raised by me against my own change, and it is a preference, not a deficiency. The real pre-fix log for the failing run has 25 <Error> lines, 21 of them from this test, and all 21 are excluded by code-independent entries: the DistributedInsertQueue logger name and the Cannot flush message. So the 279 to 516 shift cannot unmask them. That same log already contains <Error> StorageDistributed (dist_01555): Cannot flush: Code: 516 ... Authentication failed, so another test already emits the exact post-fix line shape and the leaf was green for it. Noted, not pursued.

Severity: ❌ blocker / ⚠️ major / 💡 nit. DISAGREE verdicts carry recorded evidence and are
terminal per finding.

Independently checked while reviewing, since these are what the change rests on:

  • The failing artifact contains exactly 4 lines, all logger Cluster, all Code: 198, with
    host lengths {242, 243, 250, 250} and nothing else. That multiset is what the byte model
    predicts for the old fixture, so the attribution is byte-exact rather than inferred, and
    removing those hosts empties the file. Error message in clickhouse-server.log is the only
    failing leaf of that job; the other 11 sub-tests pass.
  • 127.0.0.10 and 127.0.0.100 are not local addresses: isLocalAddress
    (src/Common/isLocalAddress.cpp:95-105) decides IPv4 loopback by value only, requiring every
    octet after the first to be at most 1, and deliberately does not fall through to the interface
    scan. So is_local is false for them exactly as it was for the unresolvable hosts, whatever
    port the server runs on. That is what keeps the assertions port-independent.
  • Sweeping tests/queries for every ENGINE = Remote/RemoteSecure and AS remote(...) first
    argument that is neither an IP literal nor localhost returns 01083 and nothing else;
    03530's 127.1 and 04308's 127.0.0.{1,2} are IP literals. No localhos[xy] line appears
    in the artifact, so the remaining carrier is latent, as the description says.
  • Extending the log-scan allowlist instead was rejected: that file deliberately keeps non-Azure
    DNS errors visible, so a class match on Cluster:.*Not found address of host would hide a
    genuine post-upgrade failure to resolve cluster peers.

Session id: cron:clickhouse-review-slot-49:20260831-073800

@clickhouse-gh clickhouse-gh Bot closed this Aug 31, 2026
@clickhouse-gh clickhouse-gh Bot reopened this Aug 31, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. I extracted the post-upgrade <Error> scan out of upgrade_runner.sh unmodified, ran the test's statements with --fake-drop, asserted the 5 tables survived as they do in CI, stopped the server, rotated its log and restarted it on the same path, then scanned the new log: 4 Cluster ... DNS_ERROR hits, every run. Not probabilistic.
b Root cause explained? Yes. The fixture needs a per-destination directory name over NAME_MAX and took that length from the destination host, so the host cannot resolve. --fake-drop makes every DROP a no-op in the upgrade check, so the four Remote tables reach the post-upgrade server; attaching ENGINE = Remote builds a Cluster unconditionally, Cluster::Address::isLocal resolves the address through Cluster::Address::getResolvedAddress, and the swallowed DNS_ERROR is reported there by tryLogCurrentException, whose default priority is Error. That is the line the scan reads.
c Fix matches root cause? Yes. It removes the DNS dependency at the layer that owns it, the fixture itself. No allowlist entry, no widened bound, no no-random-* or no-parallel tag, no reduced dataset, no guard at the logging site.
d Test intent preserved / new tests added? Preserved exactly: .reference byte-identical, every assertion and every SETTINGS clause unchanged. Proven rather than asserted: mutating the NAME_MAX predicate by one byte in each direction reddens the test both ways (> NAME_MAX + 1 leaves the over-limit serverError ARGUMENT_OUT_OF_BOUND unmet; >= NAME_MAX makes the at-limit INSERT throw, reporting "is 255, current length is 255", which independently confirms the arithmetic).
e Both directions demonstrated? Yes, same driver and same extracted scanner: 4 hits on the old fixture, 0 on the new one, with 5 surviving tables and 5 Loading table lines in both arms.
f Fix is general across code paths? General over the class it owns. All four leaked destinations are fixed, and the sweep is mechanical: after this change every address literal of an ENGINE = Remote/RemoteSecure or AS remote(...) statement in tests/queries/0_stateless is an IP literal or localhost, with one exception, 01083_expressions_in_engine_arguments, which is described above and deliberately unchanged. ENGINE = Distributed takes a cluster name rather than an address, and every <host> in tests/config is localhost or a 127.0.0.x literal, so that path cannot reach an unresolvable host either.
g Fix generalizes across inputs (params/datatypes/wrappers)? The four length classes the test covers are unchanged: at the limit, one byte over, multi-address with the offending destination second, and credentials embedded in the name. The 255/256 boundary is pinned from both sides, since the at-limit and over-limit tables share one user literal and differ by exactly one escaped host byte. The compact-format arm is address-independent by construction: Cluster::Address::toFullString builds shard{}_replica{} there.
h Backward compatible? (maintainer-approved exception only) N/A. One stateless test file, no setting default, no serialization or format change, no SettingsChangesHistory.cpp entry needed.
i Invariants and contracts preserved? Yes. Membership of dir_names is unchanged: 127.0.0.10 and 127.0.0.100 are not local addresses by ClickHouse's own loopback rule, which requires each of the middle octets to be at most 1, so both are included irrespective of prefer_localhost_replica, and the multi-address table's first destination is still 127.0.0.1 as before. The checked predicate, argument order and error code are untouched.

Session id: cron:clickhouse-impl-slot-40:20260831-065400

@clickhouse-gh

clickhouse-gh Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [df5eb9e]

Summary: ✅


AI Review

Summary

This PR removes the old stateless 04725 Remote(...) fixture, moves the long directory-name coverage into test_distributed_format, and adds a temporary upgrade_runner.sh filter for the frozen previous-release suite. The replacement integration coverage still exercises the DistributedSink name-length check that matters here, the new default_database byte boundaries are consistent with Cluster::Address::toFullString, and the temporary log filter is narrow enough for the observed 04725 carrier. I did not find a new blocker or major issue in the current revision.

Final Verdict

✅ No new findings.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Aug 31, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @devcrafter, could you review this? Test-only: 04725 took its over-NAME_MAX async distributed INSERT directory name from an unresolvable destination host, and since the upgrade check makes every DROP a no-op, the Remote table reaches the post-upgrade server, where attaching it resolves the address and logs the DNS_ERROR that the log scan reports. The length moves onto the user name and the addresses become IP literals, so the boundary and the .reference stay byte-identical.

-- An async INSERT into a Distributed/Remote table spools blocks into a directory named after the
-- destination address, so a name over NAME_MAX (255) must be a user error, not a bare std::exception.
-- The port is spelled out in every address so the name length does not depend on the server's config.
-- The addresses are IP literals because attaching a Remote table resolves them, and an unresolvable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes the 04725 carrier, but the same upgrade-check false-red still exists in the previous-release suite through 01083_expressions_in_engine_arguments.sql. 26.8 still has CREATE TABLE rich_syntax AS remote('localhos{x|y|t}', ...), and on restart DatabaseOnDisk re-executes that as_table_function; parseRemoteFunctionArguments expands it to localhosx|localhosy|localhost, then Cluster::Address::getResolvedAddress logs the same Cluster: Code: 198. DB::NetException: Not found address of host lines for the two unresolved names. The upgrade scrub only allowlists Azure DNS failures, so after this PR the same post-upgrade log leaf can still go red when 01083 is part of the old-suite run. Could you make that persisted remote(...) fixture upgrade-safe too, for example by switching it to IP literals the same way as 04725?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, and it is already in the PR description: 01083_expressions_in_engine_arguments persists an AS remote('localhos{x|y|t}', ...) proxy that resolves its addresses on attach. I measured that before publishing: a restart leaks two unmasked lines, for localhosx and localhosy, since localhost itself resolves. I am not changing that fixture here, for three measured reasons.

  1. It has never produced this failure. Over 90 days, 0 CIDB rows carry localhosx or localhosy in any check. The 04725 hosts have 6, all inside the last 24 hours, 0 on master. In the two most recent runs where this leaf went red on the 04725 signature, 04725 ran and 01083_expressions_in_engine_arguments did not, and upgrade_error_messages.txt holds no localhos line even in the run whose file has 310 error lines.

  2. The brace pattern is another test's frozen expected output. 01083_expressions_in_engine_arguments.reference:8 stores AS remote(\'localhos{x|y|t}\', cluster(...)) verbatim, and {x|y|t} is the parseRemoteFunctionArguments expansion that test covers. Switching it to IP literals rewrites that reference and removes the coverage, which is a call for its owner rather than for a CI-hygiene PR.

  3. Widening the scrub would invert this fix. upgrade_runner.sh:589 masks Azure::Storage::StorageException.*Not found address of host, and the comment at :384 states it deliberately requires the Azure exception type and the DNS error together, "so non-Azure DNS errors are not masked". A class match on Cluster:.*Not found address of host would hide a genuine post-upgrade failure to resolve cluster peers, which is exactly the signal this PR restores.

To be exact about the residual rather than to claim it away: the check runs roughly a third of the suite per run, 4812 of 14343 distinct test files in the run I measured, so 01083 is latent rather than unreachable. At 0 occurrences in 90 days I am not editing another owner's fixture on this PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction to my reply above. I declined an allow-list entry there and I have now added one, so I would rather state what changed than leave the record inconsistent.

Two things I had wrong.

The fixture rewrite in this pull request cannot clear the red on its own. upgrade_runner.sh runs the tests from a clone of the previous release tag, v26.8.1.2041-lts in the failing job's own log, not from the tree under test, so the 04725 that executes is the copy frozen in that tag. Neither this pull request nor a backport of it changes that copy; only a newer release does. The log scan does come from the tree under test, so an entry there applies at once.

The entry I declined is also not the entry I added. I argued against masking Cluster:.*Not found address of host as a class, which would hide a genuine failure to resolve a cluster peer, and that is still true. The new entry additionally requires a first host label of 64 or more identical characters, which is past the 63 octets RFC 1035 permits a label and a shape no deployment uses.

Measured against the scanner extracted from that file and the log lines of eight real occurrences: 32 of 32 fixture lines excluded, 96 unrelated lines untouched, 7 of the 8 left with an empty file. A 68 character label that is not a repeated run, a 63 character run, and the same run reported by a different logger all stay visible.

I have still left 01083 alone, for the reasons in my earlier reply.

The fixture rewrite in this PR removes the unresolvable hostnames from
04725 on master, but the upgrade check does not run the tests from the
tree under test. upgrade_runner.sh clones the previous release by its
tag (--branch=$previous_release_tag) and runs
clickhouse-test --queries="previous_release_repository/tests/queries",
so the 04725 that executes is the copy frozen inside v26.8.1.2041-lts.
That tag is immutable, so neither this PR nor a backport of it can
change the test the check actually runs; the fixture fix only takes
effect once a newer release becomes the previous release.

The log scan, by contrast, comes from the tree under test
(stress_job.py sets run_script to /repo/tests/docker_scripts/upgrade_runner.sh),
so an exclusion added here takes effect immediately, for every tree that
carries it.

The exclusion requires the Cluster logger, Code: 198, and a first host
label of 64 or more identical characters. That is past the 63 octets
RFC 1035 permits a label, and the repeated-character shape is not one
any deployment uses, so a genuine post-upgrade failure to resolve a
cluster peer still fails this job. Matching the repeated run rather
than the letters keeps the entry off the specific literals: tests/
spells the same fixture idiom with c and x runs elsewhere.

Measured against the scanner extracted from this file and the log lines
of eight real carrier runs: 32 of 32 fixture lines are excluded, the 96
unrelated mutation-class lines in the same set are untouched, and 7 of
the 8 carriers produce an empty upgrade_error_messages.txt (the eighth
keeps only those mutation-class lines). Widening the threshold, dropping
the repeated-run requirement, or corrupting either anchor all change the
result, and hosts that merely look unusual stay visible: a 68-character
label that is not a repeated run, a label of two 40-character runs, a
63-character run, and the same run reported by a different logger.

This supersedes my earlier reply on this PR declining an allowlist
entry. That reply argued against masking Cluster:.*Not found address of
host as a class, which would indeed hide real peer-resolution failures.
That is still the wrong entry and it is not this one. The reply was also
written on the assumption that the fixture fix would reach the check,
which the tag measurement above refutes.
@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Sep 1, 2026
@groeneai groeneai changed the title Do not leave unresolvable hosts in 04725's Remote tables Stop 04725's unresolvable hosts from failing the upgrade log scan Sep 1, 2026
@PedroTadim

Copy link
Copy Markdown
Member

@groeneai the issue #112719 was about a long database name, not host, can we remove the 04725_distributed_async_insert_long_directory_name.sql test and add a long database name test case to the test_distributed_format integration test?

@groeneai

groeneai commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Yes.

For the record the guard is on the whole directory name, user[:password]@host:port[#default_database][+secure] (Cluster::Address::toFullString), which is also how #112719 describes it ("no individual field has to be long at all"), so a long host reaches the same check. 04725 took the length from the host because a stateless test cannot lengthen the database component: Address::default_database is only ever assigned from <remote_servers> (src/Interpreters/Cluster.cpp:122), and the Address constructor that Remote() and remote() go through never sets it. Your reproducer therefore needs a cluster config, i.e. the integration suite.

So in this PR:

  • delete tests/queries/0_stateless/04725_distributed_async_insert_long_directory_name.{sql,reference};
  • add the long <default_database> case to tests/integration/test_distributed_format, beside the two cases Report a too long async distributed INSERT directory name as a user error #113083 already put there (test_long_directory_name_internal_replication, test_long_directory_name_rejected_before_local_write), carrying over the assertions only 04725 had: the 255/256 boundary from both sides, the message not disclosing the password, and use_compact_format_in_distributed_parts_names = 1 staying unaffected.

The upgrade_runner.sh entry has to stay for now: the job clones the previous release's test suite by tag (upgrade_runner.sh:44) and runs clickhouse-test against that copy (:148), so removing the test on master does not remove it from the release being upgraded from. It becomes removable once a release without the test is the previous one.

…ation suite

The limit applies to the whole spool directory name, `user[:password]@host:port#default_database`,
so `04725_distributed_async_insert_long_directory_name` had to take its length from a field a
stateless test can lengthen. `Cluster::Address::default_database` is only ever assigned from
`<remote_servers>` (`Cluster.cpp:122`), and the `Address` constructor that `Remote()` and
`remote()` reach never sets it, so the test used the host rather than the database name of the
reproducer in ClickHouse#112719.

Remove that test and cover a long `default_database` in `test_distributed_format`, beside the two
cases already there. The new case keeps the assertions only the stateless test had: 255 bytes
accepted and 256 rejected, the message not disclosing the password, and the compact format
unaffected. All three are pinned by the length the message reports, and each of the three fixture
clusters was mutated by one byte, or by dropping the password, to confirm the test reddens.

Its remaining assertion, that a destination rejected for being too long leaves no directory behind
for an earlier and shorter destination of the same shard, moves into the mixed-cluster test: with
`prefer_localhost_replica = 0` that shard queues two destinations instead of writing locally. The
compact-format INSERT that follows queues exactly two directories for the same table, so the zero
above is measured rather than assumed.

The upgrade log-scan entry stays for now: that job clones the previous release's suite by tag, so
the removed test still runs there.
@PedroTadim

Copy link
Copy Markdown
Member

Yes.

For the record the guard is on the whole directory name, user[:password]@host:port[#default_database][+secure] (Cluster::Address::toFullString), which is also how #112719 describes it ("no individual field has to be long at all"), so a long host reaches the same check. 04725 took the length from the host because a stateless test cannot lengthen the database component: Address::default_database is only ever assigned from <remote_servers> (src/Interpreters/Cluster.cpp:122), and the Address constructor that Remote() and remote() go through never sets it. Your reproducer therefore needs a cluster config, i.e. the integration suite.

So in this PR:

* delete `tests/queries/0_stateless/04725_distributed_async_insert_long_directory_name.{sql,reference}`;

* add the long `<default_database>` case to `tests/integration/test_distributed_format`, beside the two cases [Report a too long async distributed INSERT directory name as a user error #113083](https://github.com/ClickHouse/ClickHouse/pull/113083) already put there (`test_long_directory_name_internal_replication`, `test_long_directory_name_rejected_before_local_write`), carrying over the assertions only `04725` had: the 255/256 boundary from both sides, the message not disclosing the password, and `use_compact_format_in_distributed_parts_names = 1` staying unaffected.

The upgrade_runner.sh entry has to stay for now: the job clones the previous release's test suite by tag (upgrade_runner.sh:44) and runs clickhouse-test against that copy (:148), so removing the test on master does not remove it from the release being upgraded from. It becomes removable once a release without the test is the previous one.

@groeneai then do it

# `Azure::Storage::StorageException.*Not found address of host` is a transient Azure blob DNS resolution failure
# for `openbucketforpublicci.blob.core.windows.net`. Filtered via regex in the secondary pipe below to match
# both the Azure SDK exception type AND the DNS error together, so non-Azure DNS errors are not masked.
# `Cluster` + `Code: 198` + a first host label of one repeated character is the deliberately unresolvable

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@groeneai the changes on this file can be removed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is needed until 26.9 is out.

This job never runs master's copy of the suite: upgrade_runner.sh:44 clones the previous release by tag, and :148 runs clickhouse-test --queries="previous_release_repository/tests/queries". The previous release of a 26.9.1 build is 26.8, and 04725 is in it: present in v26.8.1.2041-lts and v26.8.2.7-lts, absent in v26.7.6.57-stable and earlier. That is also why the red appeared when it did. v26.8.1.2041-lts was published 2026-08-30T13:47Z, the first CIDB row for this signature is 2026-08-30T22:36Z, and there are 35 rows over 35 distinct PRs since, with none in the 11 days before.

So the deletion fixes master but not the tree this job upgrades from, and the entry is what clears the red now. It expires by itself once a release cut after this merge becomes the previous one, which is 26.9; that branch is not cut yet. The comment in the diff records the condition.

The pattern requires the Cluster logger, Code: 198, and a first host label of 64 or more identical characters, which is past the 63 octets RFC 1035 allows a label, so a genuine failure to resolve a cluster peer still fails the job.

If you would rather this PR not touch the file, say so and I will drop the hunk. The cost is that the log scan keeps failing on unrelated PRs until 26.9 ships.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@groeneai then we should backport this PR to the 26.8 release?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and it is better than the answer I gave above, because it retires the entry sooner.

tests/ci/get_previous_release_tag.py::find_previous_release sorts releases newest first and takes the first one below the server version that has an uploaded clickhouse-common-static_*.deb, so a 26.9.1 build upgrades from the newest 26.8.x. Today that is v26.8.2.7-lts, which still carries 04725. With the deletion backported, the next 26.8 point release will not, and from the moment it is published this job stops running the test at all, so the upgrade_runner.sh hunk can be dropped without waiting for 26.9 to be cut.

On the 26.8 branch itself that hunk is inert: a 26.8.x build upgrades from 26.7.x, and neither 04725 nor DistributedSink::checkDirectoryNameLengths exists there. It is harmless to carry along, and v26.8-must-backport is the right label and currently the only one needed, since 26.8 is the newest release branch.

The integration test is safe there too: src/Storages/Distributed/DistributedSink.cpp is byte identical on 26.8 and master, guard and both call sites, so its assertions on the exact message text hold.

One thing to expect. Applying this diff onto 26.8 leaves a single conflict, in tests/integration/test_distributed_format/test.py: 26.8 does not have the block #116301 added at the end of that file, and the new test goes next to it, so the incoming block is the resolution. The other four paths apply cleanly. I will resolve the cherry-pick when it opens.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@groeneai sure do it

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading that as the cherry-pick: I will resolve it as soon as the robot opens it, which is after this merges. Nothing else is pending on the backport itself, since the v26.8-must-backport label you applied is all it needs.

If you meant drop the upgrade_runner.sh hunk from this PR instead, say so and I will push that. It only becomes unnecessary once a 26.8 point release without 04725 is published, and the newest today is v26.8.2.7-lts, which still ships the test, so dropping it now brings the Cluster / Code: 198 reds back on unrelated PRs until then.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep as it is

@groeneai groeneai changed the title Stop 04725's unresolvable hosts from failing the upgrade log scan Move the async distributed INSERT directory name test to the integration suite Sep 2, 2026
@groeneai

groeneai commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

Done in 73ec7c3.

  • 04725_distributed_async_insert_long_directory_name.{sql,reference} are deleted.
  • test_distributed_format gains test_long_directory_name_default_database: three configured clusters that differ only in the default_database length, asserting 255 bytes accepted, 256 rejected with ARGUMENT_OUT_OF_BOUND and the exact length the message reports, the password not disclosed, and the compact format unaffected.
  • The one assertion left over, that a destination rejected for being too long leaves no directory behind for an earlier destination of the same shard, went into test_long_directory_name_rejected_before_local_write, which already has a two destination cluster.

Verified against a debug build: the whole module passes, 13 tests. Each new cluster was then mutated by one byte, and the password dropped from the third, and every arm reddens; dropping the password makes the same 242 byte name acceptable, which is what shows the password is measured. The compact format INSERT after the no directory assertion queues exactly two directories for that table, so the zero is measured rather than assumed.

The upgrade_runner.sh entry stays, since that job runs the previous release's copy of the suite. Its comment now records that master no longer carries the test and when the entry can go.

@PedroTadim
PedroTadim enabled auto-merge September 2, 2026 13:44
@PedroTadim
PedroTadim added this pull request to the merge queue Sep 2, 2026
Merged via the queue into ClickHouse:master with commit 13c33af Sep 2, 2026
343 of 344 checks passed
@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Sep 2, 2026
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Sep 2, 2026
PedroTadim added a commit that referenced this pull request Sep 2, 2026
Cherry pick #117284 to 26.8: Move the async distributed INSERT directory name test to the integration suite
robot-clickhouse added a commit that referenced this pull request Sep 2, 2026
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Sep 2, 2026
PedroTadim added a commit that referenced this pull request Sep 3, 2026
Backport #117284 to 26.8: Move the async distributed INSERT directory name test to the integration suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors groeneai-origin-ci-own-pr PR origin: CI on a groeneai PR exposed a separate defect manual approve Manual approve required to run CI pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-ci pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v26.8-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants