Skip to content

Add test: StorageFileLog silent-return branch for path outside user_files_path (ATTACH/SECONDARY_CREATE/FORCE_ATTACH/FORCE_RESTORE) untested - #104056

Merged
alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr62421
May 7, 2026
Merged

alexey-milovidov merged 1 commit into
ClickHouse:masterfrom
clickgapai:qa-bot/coverage-pr62421

Conversation

@clickgapai

Copy link
Copy Markdown
Contributor

Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.

Retrospective finding from a historical scan of PR #62421 (merged 2024-04-09). Confirmed on current codebase — close with a note if already fixed.

This is a test-only PR — no source code changes. Please review: test quality, whether the claimed coverage gaps are real, and whether test output makes sense.

Adds test coverage for 1 untested code path(s), found during automated review of PR #62421.
That PR Single-line change in StorageFileLog constructor (src/Storages/FileLog/StorageFileLog.cpp:195). The path-outside-user_files_path guard now treats LoadingStrictnessLevel::SECONDARY_CREATE (used for RESTORE from backup and for non-initial-query DDL propagation in DatabaseReplicated) the

1. StorageFileLog silent-return branch for path outside user_files_path (ATTACH/SECONDARY_CREATE/FORCE_ATTACH/FORCE_RESTORE) untested
src/Storages/FileLog/StorageFileLog.cpp:195, src/Storages/FileLog/StorageFileLog.cpp:198
Risk: Call chain: InterpreterCreateQuery::createTable (src/Interpreters/InterpreterCreateQuery.cpp:1559) computes `mode = getLoadingStrictnessLevel(create.attach, ..., is_secondary_query || is_restore_f
What's unique vs PR tests: PR ships zero tests. Existing 02125/02126 tests cover only the throw side at line 200 with default CREATE mode. My test is the first to exercise the silent-return side (line 195-198) — the exact branc

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

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

Not applicable — test-only change.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

@clickgapai clickgapai mentioned this pull request May 4, 2026
30 tasks
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label May 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented May 6, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [32654c2]

Summary: ✅


AI Review

Summary

This PR adds a stateless shell test (04202_filelog_attach_path_outside_user_files.sh) plus reference output to cover FileLog ATTACH behavior when the path is outside user_files_path. I did not find correctness, safety, or reliability issues in the proposed test change.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ✅
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label May 6, 2026

@alexey-milovidov alexey-milovidov left a comment

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.

Almost pointless, but okay.

@alexey-milovidov alexey-milovidov self-assigned this May 7, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue May 7, 2026
Merged via the queue into ClickHouse:master with commit 34e88b3 May 7, 2026
165 checks passed
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-synced-to-cloud The PR is synced to the cloud repo label May 7, 2026
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 pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants