Replicated access storage in stateless tests#67954
Conversation
1 similar comment
|
Dear @pufit, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
|
Dear @pufit, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
2 similar comments
|
Dear @pufit, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
|
Dear @pufit, this PR hasn't been updated for a while. Will you continue working on it? If not, please close it. Otherwise, ignore this message. |
|
Workflow [PR], commit [11ec6d1] Summary: ❌
AI ReviewSummaryThis PR enables Findings❌ Blockers
Final Verdict
|
|
@pufit, good change, let's merge it. |
|
It will require some effort to make it work for all tests. I'll do it as soon as I clear all my other tasks |
|
@pufit, how is it? |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Source grants with URI/regexp filters are not compatible with replicated access storage, as the filter patterns may not serialize/deserialize correctly through ZooKeeper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Dear @alexey-milovidov, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
…cess-storage-in-tests
…ccess storage These stateless tests assert access-entity output that differs under replicated access storage, which this PR enables for the `DatabaseReplicated` test configuration: - `01292_create_user`, `01293_create_role`, `01294_create_settings_profile`, `01295_create_row_policy`, `01297_create_quota` select the `storage` column from `system.users`/`system.roles`/etc., which reports `replicated` instead of `local_directory`. - `01939_user_with_default_database`, `03313_sources_read_write_grants`, `03594_system_grants_parameters` depend on access-entity behavior that differs under the replicated access storage cluster. Exclude them from the replicated-database configuration, consistent with `03595_sources_regexp_filter_grants` and `03636_normalize_url_in_source_grants`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Picked up this PR (it was ~17k commits / ~2.5 months behind Merged Fixed the CI failures in the
I tagged all eight with One thing worth a look: in The only other failure was CI report: #67954 |
| @@ -1,4 +1,4 @@ | |||
| -- Tags: no-fasttest, no-parallel | |||
| -- Tags: no-fasttest, no-parallel, no-replicated-database | |||
There was a problem hiding this comment.
This skip hides a real ReplicatedAccessStorage regression, not just an output difference. In this test we grant READ ON POSTGRES and WRITE ON ODBC; the replicated-storage run described in the PR discussion produced extra READ ON ODBC and WRITE ON POSTGRES grants. ReplicatedAccessStorage persists users through serializeAccessEntity, so this points to the persisted grant representation widening source privileges after the round trip. Please keep this coverage in the replicated-database run and fix the source-grant round trip, or add an equivalent focused replicated-access test, instead of excluding it.
There was a problem hiding this comment.
Confirmed — this is a real privilege-widening round trip, not just an output-format difference. I reproduced it against a server with ReplicatedAccessStorage:
GRANT READ ON POSTGRES TO test_user_03593;
GRANT WRITE ON ODBC TO test_user_03593;
SELECT access_type, access_object FROM system.grants WHERE user_name = 'test_user_03593';
yields READ/WRITE on both POSTGRES and ODBC, instead of READ POSTGRES / WRITE ODBC.
Root cause: with enable_read_write_grants = false (the default), AccessRightsElement::makeBackwardCompatible collapses a single-direction source grant such as READ ON POSTGRES to the deprecated global POSTGRES flag when serializing, and on read-back replaceDeprecated re-expands POSTGRES to READ | WRITE ON POSTGRES. ReplicatedAccessStorage round-trips entities through serializeAccessEntity, so the widened form is what ends up live (the same would happen for DiskAccessStorage across a restart).
This is a fix in the access-control serialization semantics, not a test issue, so I am leaving 03594_system_grants_parameters (and the sibling source-grant tests 03313/03595/03636, plus 01939) tagged no-replicated-database for now and leaving this thread open. @pufit, this is the consistency issue worth a dedicated fix — likely either preserving READ/WRITE granularity through the deprecated-flag round trip, or having these tests run with enable_read_write_grants = true.
…ess storage Tests `01292_create_user`, `01293_create_role`, `01294_create_settings_profile`, `01295_create_row_policy` and `01297_create_quota` were tagged `no-replicated-database` because, under `ReplicatedAccessStorage`, the `storage` column of `system.users`/ `system.roles`/`system.settings_profiles`/`system.row_policies`/`system.quotas` reports `replicated` instead of `local_directory`. That was the only difference: verified against a server configured with `ReplicatedAccessStorage`, the rest of each test (`SHOW CREATE`, `ALTER`, roles, settings, policies, quotas, `system.*` serialization) matches the reference exactly. Instead of excluding these from the `DatabaseReplicated` run, normalize only the `storage` column with `if(storage = 'replicated', 'local_directory', storage)` so the core access-entity coverage keeps running against replicated access storage. The expression is a no-op for the default `local_directory` storage, so the non-replicated run is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Picked this up to address the two AI-review threads. Restored coverage for the five The The branch is ~3 days / green behind |
…cess-storage-in-tests
…cess-storage-in-tests
…cess-storage-in-tests
|
Re-merged The previous red was only the
The AI review verdict stays |
| @@ -1,5 +1,5 @@ | |||
| #!/usr/bin/env bash | |||
| # Tags: no-parallel, no-flaky-check | |||
| # Tags: no-parallel, no-flaky-check, no-replicated-database | |||
There was a problem hiding this comment.
This skip hides a separate ReplicatedAccessStorage serialization bug, not just the source-grant widening tracked on 03594. The test creates a real database named NONE and then sets the user with ``DEFAULT DATABASE NONE```; serializeAccessEntity` formats that through `ASTDatabaseOrNone`/`backQuoteIfNeed` as `DEFAULT DATABASE NONE`, and `ParserDatabaseOrNone` reads that back as the sentinel that clears the default database. After a replicated round trip the user no longer starts in the `NONE` database. Please keep this case covered in the replicated run and fix the attach/show-create serialization so the literal database name is quoted, or add an equivalent focused replicated-access regression test before excluding it.
The branch shares two merge-bases with `master` (the original 2024-08-07 base and a recent one), so git's recursive strategy generated spurious whole-tree conflicts while merging the virtual ancestor. This branch only changes 12 test/config files on top of `master` (0 changes under `src/`), so the merge was resolved deterministically: reset the merged tree to `master`, then re-apply exactly the PR's 12-file diff. The result is `master` plus the PR's +24/-10 test changes and nothing else.
| @@ -1,5 +1,5 @@ | |||
| #!/usr/bin/env bash | |||
| # Tags: no-fasttest | |||
| # Tags: no-fasttest, no-replicated-database | |||
There was a problem hiding this comment.
This skip is still masking a real ReplicatedAccessStorage round-trip bug, not just a test incompatibility. With the default access_control_improvements.enable_read_write_grants = false in the stateless config, serializeAccessEntity formats READ ON URL('http://localhost:812[1-3]/.*') through AccessRightsElement::makeBackwardCompatible, which rewrites the grant to the deprecated URL access type and clears the source parameter (src/Access/Common/AccessRightsElement.cpp:369-384). After that, formatONClause only emits the (<regexp>) filter when read/write grants are enabled (src/Access/Common/AccessRightsElement.cpp:189-191), so the replicated-storage ATTACH GRANT loses the filter entirely and reattaches as an unfiltered source grant. Please keep replicated-access coverage for this case and fix the serialization path, or add an equivalent focused regression test, instead of tagging it out.
LLVM Coverage ReportChanged lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 164 line(s), 38 function(s) across 53 file(s) · Details Top files
|

Changelog category (leave one):